From bc3a6e8a0a885fc4c99dee104316f8367bf2aa83 Mon Sep 17 00:00:00 2001 From: leodinh Date: Thu, 24 Feb 2022 01:23:58 -0500 Subject: [PATCH 01/52] feat: added deploy contracts v2 script, preparing setup polygon script --- deploy/001_deploy_contracts_v2.ts | 108 ++++++++++++++++++++++++++ deploy/002_setup_polygon.ts | 28 +++++++ hardhat.config.ts | 1 + helpers/constants/adapters-polygon.ts | 11 +++ tsconfig.json | 1 + 5 files changed, 149 insertions(+) create mode 100644 deploy/001_deploy_contracts_v2.ts create mode 100644 deploy/002_setup_polygon.ts create mode 100644 helpers/constants/adapters-polygon.ts diff --git a/deploy/001_deploy_contracts_v2.ts b/deploy/001_deploy_contracts_v2.ts new file mode 100644 index 000000000..f00d7cc8c --- /dev/null +++ b/deploy/001_deploy_contracts_v2.ts @@ -0,0 +1,108 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RegistryProxy, RiskManagerV2, RiskManagerProxy } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = ( + await deploy("RegistryV2", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, + }) + ).address; + + const registryProxyAddress = ( + await deploy("RegistryProxy", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, + }) + ).address; + + const registryProxyContract: RegistryProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) + ); + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress) + ); + + await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); + await registryContract.connect(owner).become(registryProxyAddress); + + const riskManagerAddress = ( + await deploy("RiskManagerV2", { + from: await owner.getAddress(), + args: [registryProxyContract.address], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, + }) + ).address; + + const riskManagerProxyAddress = ( + await deploy("RiskManagerProxy", { + from: await owner.getAddress(), + args: [registryProxyContract.address], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, + }) + ).address; + + const riskManagerProxyContract: RiskManagerProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) + ); + + let riskManagerContract: RiskManagerV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) + ); + + await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); + await riskManagerContract.connect(owner).become(riskManagerProxyAddress); + riskManagerContract = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerProxyAddress) + ); + + const strategyProviderAddress = ( + await deploy("StrategyProviderV2", { + from: await owner.getAddress(), + args: [registryProxyContract.address], + log: true, + contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, + }) + ).address; + + const strategyManagerAddress = ( + await deploy("StrategyManager", { + from: await owner.getAddress(), + args: [registryProxyContract.address], + log: true, + contract: ESSENTIAL_CONTRACTS.STRATEGY_MANAGER, + }) + ).address; + + const harvestCodeProviderAddress = ( + await deploy("HarvestCodeProvider", { + from: await owner.getAddress(), + args: [registryProxyContract.address], + log: true, + contract: ESSENTIAL_CONTRACTS.HARVEST_CODE_PROVIDER, + }) + ).address; + console.log("----------------------------------------"); + console.log("Setting essential contracts in RegistryV2"); + await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); + await executeFunc(registryContract, owner, "setHarvestCodeProvider(address)", [harvestCodeProviderAddress]); + await executeFunc(registryContract, owner, "setStrategyManager(address)", [strategyManagerAddress]); + await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); + console.log("Finished deploying all essential contracts"); +}; + +export default func; +func.tags = ["Contracts"]; diff --git a/deploy/002_setup_polygon.ts b/deploy/002_setup_polygon.ts new file mode 100644 index 000000000..6784be5bc --- /dev/null +++ b/deploy/002_setup_polygon.ts @@ -0,0 +1,28 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ADAPTERS } from "../helpers/constants/adapters-polygon"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { addRiskProfiles } from "../helpers/contracts-actions"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + + await addRiskProfiles(owner, registryContract); + + for (let i = 0; i < ADAPTERS.length; i = +1) { + const adapter = ADAPTERS[i]; + await deploy(adapter, { + from: await owner.getAddress(), + args: [], + log: true, + contract: adapter, + }); + } +}; + +export default func; +func.tags = ["Polygon"]; diff --git a/hardhat.config.ts b/hardhat.config.ts index cd3bae42f..b6db81ec9 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -112,6 +112,7 @@ const config: HardhatUserConfig = { chainId: NETWORKS_CHAIN_ID[eEVMNetwork.ganache], }, kovan: getCommonNetworkConfig(eEVMNetwork.kovan, NETWORKS_CHAIN_ID[eEVMNetwork.kovan]), + polygon: getCommonNetworkConfig(eEVMNetwork.polygon, NETWORKS_CHAIN_ID[eEVMNetwork.polygon]), hardhat: { hardfork: "london", initialBaseFeePerGas: 1_00_000_000, diff --git a/helpers/constants/adapters-polygon.ts b/helpers/constants/adapters-polygon.ts new file mode 100644 index 000000000..1eb74743b --- /dev/null +++ b/helpers/constants/adapters-polygon.ts @@ -0,0 +1,11 @@ +export const AAVE_ADAPTER_NAME: string = "AaveAdapter"; +export const CURVE_STABLE_SWAP_ADAPTER: string = "CurveStableSwapAdapter"; +export const CURVE_GAUGE_ADAPTER: string = "CurveGaugeAdapter"; +export const CURVE_METAPOOL_FACTORY_ADAPTER: string = "CurveMetapoolFactoryAdapter"; + +export const ADAPTERS = [ + AAVE_ADAPTER_NAME, + CURVE_STABLE_SWAP_ADAPTER, + CURVE_GAUGE_ADAPTER, + CURVE_METAPOOL_FACTORY_ADAPTER, +]; diff --git a/tsconfig.json b/tsconfig.json index 90802685d..1c871952a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,7 @@ "typechain/**/*.d.ts", "typechain/**/*.ts", "optyfi-sdk/**/*.ts", + "deploy/*.ts", "scripts/*.ts" ] } From ec9fc6c6c6e18425377a9a65adc85c03ea20dc1b Mon Sep 17 00:00:00 2001 From: leodinh Date: Fri, 25 Feb 2022 01:15:40 -0500 Subject: [PATCH 02/52] feat: added deploy_kovan script and initialized deploy_polygon and deploy_mumbai scripts --- .gitmodules | 3 + contracts/protocol/aave-polygon-adapter | 1 + deploy_kovan/001_upgrade_registryV2.ts | 32 ++++ deploy_kovan/002_deploy_strategyProviderV2.ts | 30 +++ deploy_kovan/004_upgrade_riskManagerV2.ts | 33 ++++ deploy_kovan/005_deploy_vaultv2_usdc.ts | 49 +++++ deploy_polygon/001_deploy_registryV2.ts | 40 ++++ .../002_deploy_strategyProviderV2.ts | 30 +++ deploy_polygon/003_deploy_riskManagerV2.ts | 49 +++++ deploy_polygon/004_deploy_aaveadapter.ts | 81 ++++++++ deploy_polygon/005_deploy_curveadapters.ts | 0 deploy_polygon/006_deploy_vault_usdc.ts | 0 deploy_polygon/007_deploy_vault_wmatic.ts | 0 helpers/constants/adapters-polygon.ts | 9 +- helpers/contracts-actions.ts | 173 ++++++++++++++++++ helpers/data/polygon_defiPools.ts | 12 ++ helpers/type.d.ts | 20 +- tsconfig.json | 4 +- 18 files changed, 543 insertions(+), 23 deletions(-) create mode 160000 contracts/protocol/aave-polygon-adapter create mode 100644 deploy_kovan/001_upgrade_registryV2.ts create mode 100644 deploy_kovan/002_deploy_strategyProviderV2.ts create mode 100644 deploy_kovan/004_upgrade_riskManagerV2.ts create mode 100644 deploy_kovan/005_deploy_vaultv2_usdc.ts create mode 100644 deploy_polygon/001_deploy_registryV2.ts create mode 100644 deploy_polygon/002_deploy_strategyProviderV2.ts create mode 100644 deploy_polygon/003_deploy_riskManagerV2.ts create mode 100644 deploy_polygon/004_deploy_aaveadapter.ts create mode 100644 deploy_polygon/005_deploy_curveadapters.ts create mode 100644 deploy_polygon/006_deploy_vault_usdc.ts create mode 100644 deploy_polygon/007_deploy_vault_wmatic.ts create mode 100644 helpers/data/polygon_defiPools.ts diff --git a/.gitmodules b/.gitmodules index 2607bf614..ccc5ad1f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "contracts/protocol/curve-polygon-adapter"] path = contracts/protocol/curve-polygon-adapter url = git@github.com:Opty-Fi/curve-polygon-adapter.git +[submodule "contracts/protocol/aave-polygon-adapter"] + path = contracts/protocol/aave-polygon-adapter + url = git@github.com:Opty-Fi/aave-polygon-adapter.git diff --git a/contracts/protocol/aave-polygon-adapter b/contracts/protocol/aave-polygon-adapter new file mode 160000 index 000000000..ba4ee1951 --- /dev/null +++ b/contracts/protocol/aave-polygon-adapter @@ -0,0 +1 @@ +Subproject commit ba4ee19515f987d5a2fbb953842b6a61899531dc diff --git a/deploy_kovan/001_upgrade_registryV2.ts b/deploy_kovan/001_upgrade_registryV2.ts new file mode 100644 index 000000000..d0e66857d --- /dev/null +++ b/deploy_kovan/001_upgrade_registryV2.ts @@ -0,0 +1,32 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RegistryProxy } from "../typechain"; +import KOVAN from "../_deployments/kovan.json"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = ( + await deploy("RegistryV2", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, + }) + ).address; + + const registryProxyContract: RegistryProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, KOVAN.RegistryProxy) + ); + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); + await registryContract.connect(owner).become(KOVAN.RegistryProxy); +}; + +export default func; +func.tags = ["RegistryV2"]; diff --git a/deploy_kovan/002_deploy_strategyProviderV2.ts b/deploy_kovan/002_deploy_strategyProviderV2.ts new file mode 100644 index 000000000..b88acae1c --- /dev/null +++ b/deploy_kovan/002_deploy_strategyProviderV2.ts @@ -0,0 +1,30 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import KOVAN from "../_deployments/kovan.json"; +import { RegistryV2 } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + + const strategyProviderAddress = ( + await deploy("StrategyProviderV2", { + from: await owner.getAddress(), + args: [KOVAN.RegistryProxy], + log: true, + contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, + }) + ).address; + + const registryContract = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, KOVAN.RegistryProxy) + ); + + await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); +}; + +export default func; +func.tags = ["StrategyProviderV2"]; diff --git a/deploy_kovan/004_upgrade_riskManagerV2.ts b/deploy_kovan/004_upgrade_riskManagerV2.ts new file mode 100644 index 000000000..b885025e5 --- /dev/null +++ b/deploy_kovan/004_upgrade_riskManagerV2.ts @@ -0,0 +1,33 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RiskManagerV2, RiskManagerProxy } from "../typechain"; +import KOVAN from "../_deployments/kovan.json"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskManagerAddress = ( + await deploy("RiskManagerV2", { + from: await owner.getAddress(), + args: [KOVAN.RegistryProxy], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, + }) + ).address; + + const riskManagerProxyContract: RiskManagerProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, KOVAN.RiskManagerProxy) + ); + + const riskManagerContract: RiskManagerV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) + ); + + await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); + await riskManagerContract.connect(owner).become(KOVAN.RiskManagerProxy); +}; + +export default func; +func.tags = ["RiskManagerV2"]; diff --git a/deploy_kovan/005_deploy_vaultv2_usdc.ts b/deploy_kovan/005_deploy_vaultv2_usdc.ts new file mode 100644 index 000000000..b1865898a --- /dev/null +++ b/deploy_kovan/005_deploy_vaultv2_usdc.ts @@ -0,0 +1,49 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import { RISK_PROFILES } from "../helpers/constants/contracts-data"; +import KOVAN from "../_deployments/kovan.json"; +import { expect } from "chai"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner, admin] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskProfileCode = 2; + const oldVault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy); + const underlyingToken = await oldVault.underlyingToken(); + const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); + const underlyingTokenName = await tokenContract.name(); + const underlyingTokenSymbol = await tokenContract.symbol(); + const vaultAddress = ( + await deploy("VaultV2", { + from: await owner.getAddress(), + args: [ + KOVAN.RegistryProxy, + underlyingTokenName, + underlyingTokenSymbol, + RISK_PROFILES[riskProfileCode].name, + RISK_PROFILES[riskProfileCode].symbol, + ], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_V2, + }) + ).address; + + const vaultProxy = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_PROXY, KOVAN.opAVUSDCint.VaultProxy); + + expect(vaultProxy.ADMIN()).to.be.equals(await admin.getAddress()); + await executeFunc(vaultProxy, admin, "upgradeTo(address)", [vaultAddress]); + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); + + await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + KOVAN.RegistryProxy, + underlyingToken, + underlyingTokenName, + underlyingTokenSymbol, + riskProfileCode, + ]); +}; + +export default func; +func.tags = ["VaultV2"]; diff --git a/deploy_polygon/001_deploy_registryV2.ts b/deploy_polygon/001_deploy_registryV2.ts new file mode 100644 index 000000000..9ca2b5c34 --- /dev/null +++ b/deploy_polygon/001_deploy_registryV2.ts @@ -0,0 +1,40 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RegistryProxy } from "../typechain"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = ( + await deploy("RegistryV2", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, + }) + ).address; + const registryProxyAddress = ( + await deploy("RegistryProxy", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, + }) + ).address; + + const registryProxyContract: RegistryProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) + ); + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); + await registryContract.connect(owner).become(registryProxyAddress); +}; + +export default func; +func.tags = ["RegistryV2"]; diff --git a/deploy_polygon/002_deploy_strategyProviderV2.ts b/deploy_polygon/002_deploy_strategyProviderV2.ts new file mode 100644 index 000000000..a17da1325 --- /dev/null +++ b/deploy_polygon/002_deploy_strategyProviderV2.ts @@ -0,0 +1,30 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2 } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + const strategyProviderAddress = ( + await deploy("StrategyProviderV2", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, + }) + ).address; + + await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); +}; + +export default func; +func.tags = ["StrategyProviderV2", "Polygon"]; diff --git a/deploy_polygon/003_deploy_riskManagerV2.ts b/deploy_polygon/003_deploy_riskManagerV2.ts new file mode 100644 index 000000000..bc1b9d402 --- /dev/null +++ b/deploy_polygon/003_deploy_riskManagerV2.ts @@ -0,0 +1,49 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RiskManagerV2, RiskManagerProxy } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + const riskManagerAddress = ( + await deploy("RiskManagerV2", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, + }) + ).address; + + const riskManagerProxyAddress = ( + await deploy("RiskManagerProxy", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, + }) + ).address; + + const riskManagerProxyContract: RiskManagerProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) + ); + + const riskManagerContract: RiskManagerV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) + ); + + await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); + await riskManagerContract.connect(owner).become(riskManagerProxyAddress); + await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); +}; + +export default func; +func.tags = ["RegistryV2"]; diff --git a/deploy_polygon/004_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts new file mode 100644 index 000000000..b0ba8f215 --- /dev/null +++ b/deploy_polygon/004_deploy_aaveadapter.ts @@ -0,0 +1,81 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ADAPTERS as POLYGON_ADAPTERS } from "../helpers/constants/adapters-polygon"; +import { ADAPTERS as ETHEREUM_ADAPTERS } from "../helpers/constants/adapters"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; +import { DEFI_POOLS_DATA } from "../helpers/type"; +import { + addRiskProfiles, + approveAndMapTokenHashToTokensV2, + approveLiquidityPoolAndMapAdaptersV2, +} from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const adapters = ["polygon", "mumbai"].includes(hre.network.name) ? POLYGON_ADAPTERS : ETHEREUM_ADAPTERS; + const deployedAdapters: { [adapterName: string]: string } = {}; + for (let i = 0; i < adapters.length; i = +1) { + const adapter = adapters[i]; + deployedAdapters[adapter] = ( + await deploy(adapter, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: adapter, + }) + ).address; + } + console.log("Deployed Adapters."); + console.log("----------------------"); + + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + : []; + const tokens = + tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[hre.network.name][token].address) : []; + + if (tokens.length > 0) { + console.log("Approving Tokens..."); + + await approveAndMapTokenHashToTokensV2( + owner, + registryContract, + tokens, + true, + NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + false, + ); + } + + let adapterMapliquidityPools: DEFI_POOLS_DATA = {}; + switch (hre.network.name) { + case eEVMNetwork.polygon: { + adapterMapliquidityPools = PolygonDefiPools; + break; + } + default: + break; + } + let liquidityPoolsAddressesMapAdapter: string[][] = []; + const protocolNames = Object.keys(adapterMapliquidityPools); + for (let i = 0; i < protocolNames.length; i++) { + const adapterName = `${protocolNames[i]}Adapter`; + const liquidityPools = adapterMapliquidityPools[protocolNames[i]]; + const poolAddressesWithAdapter = tokenKeys.map(token => [ + deployedAdapters[adapterName], + liquidityPools[token].lpToken, + ]); + liquidityPoolsAddressesMapAdapter = poolAddressesWithAdapter; + } + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["Setup"]; diff --git a/deploy_polygon/005_deploy_curveadapters.ts b/deploy_polygon/005_deploy_curveadapters.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/006_deploy_vault_usdc.ts b/deploy_polygon/006_deploy_vault_usdc.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/007_deploy_vault_wmatic.ts b/deploy_polygon/007_deploy_vault_wmatic.ts new file mode 100644 index 000000000..e69de29bb diff --git a/helpers/constants/adapters-polygon.ts b/helpers/constants/adapters-polygon.ts index 1eb74743b..7508743c7 100644 --- a/helpers/constants/adapters-polygon.ts +++ b/helpers/constants/adapters-polygon.ts @@ -1,11 +1,6 @@ export const AAVE_ADAPTER_NAME: string = "AaveAdapter"; export const CURVE_STABLE_SWAP_ADAPTER: string = "CurveStableSwapAdapter"; export const CURVE_GAUGE_ADAPTER: string = "CurveGaugeAdapter"; -export const CURVE_METAPOOL_FACTORY_ADAPTER: string = "CurveMetapoolFactoryAdapter"; -export const ADAPTERS = [ - AAVE_ADAPTER_NAME, - CURVE_STABLE_SWAP_ADAPTER, - CURVE_GAUGE_ADAPTER, - CURVE_METAPOOL_FACTORY_ADAPTER, -]; +export const ADAPTERS = [AAVE_ADAPTER_NAME, CURVE_STABLE_SWAP_ADAPTER, CURVE_GAUGE_ADAPTER]; +export const PROTOCOLS = ADAPTERS.map(item => item.split("Adapter")[0]); diff --git a/helpers/contracts-actions.ts b/helpers/contracts-actions.ts index 14b8124db..77d3a8ac9 100644 --- a/helpers/contracts-actions.ts +++ b/helpers/contracts-actions.ts @@ -13,6 +13,7 @@ import { generateTokenHash, getEthValueGasOverrideOptions, isAddress, + generateTokenHashV2, } from "./helpers"; import { amountInHex } from "./utils"; import { TypedEOA } from "./data"; @@ -65,6 +66,66 @@ export async function approveLiquidityPoolAndMapAdapters( } } +export async function approveLiquidityPoolAndMapAdapterV2( + owner: Signer, + registryContractV2: Contract, + adapter: string, + lqPool: string, + checkApproval: boolean, +): Promise { + try { + if (checkApproval) { + const { isLiquidityPool } = await registryContractV2.getLiquidityPool(lqPool); + if (!isLiquidityPool) { + await expect(registryContractV2.connect(owner)["approveLiquidityPool(address)"](lqPool)) + .to.emit(registryContractV2, "LogLiquidityPool") + .withArgs(getAddress(lqPool), true, await owner.getAddress()); + } + await expect(registryContractV2.connect(owner)["setLiquidityPoolToAdapter(address,address)"](lqPool, adapter)) + .to.emit(registryContractV2, "LogLiquidityPoolToAdapter") + .withArgs(getAddress(lqPool), adapter, await owner.getAddress()); + } else { + await registryContractV2.connect(owner)["approveLiquidityPoolAndMapToAdapter(address,address)"](lqPool, adapter); + } + } catch (error) { + console.error(`contract-actions#approveLiquidityPoolAndMapAdapterV2: `, error); + throw error; + } +} + +export async function approveLiquidityPoolAndMapAdaptersV2( + owner: Signer, + registryContractV2: Contract, + lqPools: string[], + lqPoolsMapToAdapter: string[][], + checkApproval: boolean, +): Promise { + try { + if (checkApproval) { + const approveLpList: string[] = []; + for (let i = 0; i < lqPools.length; i++) { + const { isLiquidityPool } = await registryContractV2.getLiquidityPool(lqPools[i]); + if (!isLiquidityPool) { + approveLpList.push(lqPools[i]); + } + } + if (approveLpList.length > 0) { + await executeFunc(registryContractV2, owner, "approveLiquidityPool(address[])", [approveLpList]); + } + await executeFunc(registryContractV2, owner, "setLiquidityPoolToAdapter((address,address)[])", [ + lqPoolsMapToAdapter, + ]); + } else { + await executeFunc(registryContractV2, owner, "approveLiquidityPoolAndMapToAdapter((address,address)[])", [ + lqPoolsMapToAdapter, + ]); + } + } catch (error) { + console.error(`contracts-actions#approveLiquidityPoolAndMapAdaptersV2: `, error); + throw error; + } +} + export async function approveAndSetTokenHashToToken( owner: Signer, registryContract: Contract, @@ -124,6 +185,97 @@ export async function approveAndSetTokenHashToTokens( } } +export async function approveAndMapTokenHashToTokenV2( + owner: Signer, + registryContractV2: Contract, + tokenAddress: string, + chainId: string, + checkApproval: boolean, +): Promise { + try { + if (checkApproval) { + const isApprovedToken = await registryContractV2.isApprovedToken(tokenAddress); + if (!isApprovedToken) { + await expect(executeFunc(registryContractV2, owner, "approveToken(address)", [tokenAddress])) + .to.emit(registryContractV2, "LogToken") + .withArgs(getAddress(tokenAddress), true, await owner.getAddress()); + } + if (!(await isSetTokenHashV2(registryContractV2, [tokenAddress], chainId))) { + const tokenHash = generateTokenHashV2([tokenAddress], chainId); + await executeFunc(registryContractV2, owner, "setTokensHashToTokens(bytes32,address[])", [ + tokenHash, + [tokenAddress], + ]); + } + } else { + const tokenHash = generateTokenHashV2([tokenAddress], chainId); + await executeFunc(registryContractV2, owner, "approveTokenAndMapToTokensHash(bytes32,address[])", [ + tokenHash, + [tokenAddress], + ]); + } + } catch (error) { + console.error(`contract-actions#approveAndMapTokenHashToToken : `, error); + throw error; + } +} + +export async function approveAndMapTokenHashToTokensV2( + owner: Signer, + registryContractV2: Contract, + tokenAddresses: string[], + setTokenHashForEach: boolean, + chainId: string, + checkApproval: boolean, +): Promise { + try { + const setTokenHashLists: string[] = []; + for (const tokenAddress of tokenAddresses) { + if (setTokenHashForEach) { + if (!(await isSetTokenHashV2(registryContractV2, [tokenAddress], chainId))) { + setTokenHashLists.push(tokenAddress); + } + } + } + if (checkApproval) { + const approveTokenLists: string[] = []; + for (const tokenAddress of tokenAddresses) { + const isApprovedToken = await registryContractV2.isApprovedToken(tokenAddress); + if (!isApprovedToken) { + approveTokenLists.push(tokenAddress); + } + } + if (approveTokenLists.length > 0) { + await executeFunc(registryContractV2, owner, "approveToken(address[])", [approveTokenLists]); + } + if (setTokenHashLists.length > 0) { + const tokens = setTokenHashLists.map(addr => [generateTokenHashV2([addr], chainId), [addr]]); + await executeFunc(registryContractV2, owner, "setTokensHashToTokens((bytes32,address[])[])", [tokens]); + } else { + if (!(await isSetTokenHashV2(registryContractV2, tokenAddresses, chainId))) { + await executeFunc(registryContractV2, owner, "setTokensHashToTokens((bytes32,address[])[])", [ + [[generateTokenHashV2(tokenAddresses, chainId), tokenAddresses]], + ]); + } + } + } else { + if (setTokenHashLists.length > 0) { + const tokens = setTokenHashLists.map(addr => [generateTokenHashV2([addr], chainId), [addr]]); + await executeFunc(registryContractV2, owner, "approveTokenAndMapToTokensHash((bytes32,address[])[])", [tokens]); + } else { + if (!(await isSetTokenHashV2(registryContractV2, tokenAddresses, chainId))) { + await executeFunc(registryContractV2, owner, "approveTokenAndMapToTokensHash((bytes32,address[])[])", [ + [[generateTokenHashV2(tokenAddresses, chainId), tokenAddresses]], + ]); + } + } + } + } catch (error) { + console.error(`contract-actions#approveAndMapTokenHashToTokens: `, error); + throw error; + } +} + export async function setStrategy( strategy: STRATEGY_DATA[], signer: Signer, @@ -624,3 +776,24 @@ export async function addWhiteListForHarvest( await harvestController.addToWhitelist(contractAddress); await harvestController.addCodeToWhitelist(contractAddress); } + +export async function isSetTokenHashV2( + registryContractV2: Contract, + tokenAddresses: string[], + chainId: string, +): Promise { + const tokensHash = generateTokenHashV2(tokenAddresses, chainId); + const tokenAddressesInContract = await registryContractV2.getTokensHashToTokenList(tokensHash); + if (tokenAddressesInContract.length === 0) { + return false; + } + for (let i = 0; i < tokenAddresses.length; i++) { + if ( + isAddress(tokenAddressesInContract[i]) && + getAddress(tokenAddressesInContract[i]) !== getAddress(tokenAddresses[i]) + ) { + return false; + } + } + return true; +} diff --git a/helpers/data/polygon_defiPools.ts b/helpers/data/polygon_defiPools.ts new file mode 100644 index 000000000..8c028382e --- /dev/null +++ b/helpers/data/polygon_defiPools.ts @@ -0,0 +1,12 @@ +import { default as AaveDefiPools } from "optyfi-sdk/polygon/pools/Aave.json"; +import { default as CurveGaugeDefiPools } from "optyfi-sdk/polygon/pools/CurveGauge.json"; +import { default as CurveStableSwapDefiPools } from "optyfi-sdk/polygon/pools/CurveStableSwap.json"; +import { AAVE_ADAPTER_NAME, CURVE_GAUGE_ADAPTER, CURVE_STABLE_SWAP_ADAPTER } from "../constants/adapters-polygon"; + +import { DEFI_POOLS_DATA } from "../type"; + +export const TypedDefiPools: DEFI_POOLS_DATA = { + [AAVE_ADAPTER_NAME]: AaveDefiPools, + [CURVE_GAUGE_ADAPTER]: CurveGaugeDefiPools, + [CURVE_STABLE_SWAP_ADAPTER]: CurveStableSwapDefiPools, +}; diff --git a/helpers/type.d.ts b/helpers/type.d.ts index b9a9971d8..2ddd47036 100644 --- a/helpers/type.d.ts +++ b/helpers/type.d.ts @@ -60,30 +60,20 @@ export type STRATEGY_DATA = { isBorrow: boolean; }; -export type DEFI_POOLS_DATA = { - [key: string]: { - [name: string]: { - pool: string; - lpToken: string; - tokens: string[]; - stakingVault?: string; - pid?: string; - deprecated?: boolean; - }; - }; -}; - -export type DEFI_POOL_DATA = { +export type DEFI_POOLS = { [name: string]: { pool: string; lpToken: string; tokens: string[]; - rewardTokens: string[]; stakingVault?: string; + rewardTokens?: string[]; pid?: string; deprecated?: boolean; }; }; +export type DEFI_POOLS_DATA = { + [key: string]: DEFI_POOLS; +}; export type ADAPTER_WITH_STRATEGIES_DATA = { [key: string]: STRATEGY[]; diff --git a/tsconfig.json b/tsconfig.json index 1c871952a..98c602649 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,9 @@ "typechain/**/*.d.ts", "typechain/**/*.ts", "optyfi-sdk/**/*.ts", - "deploy/*.ts", + "deploy_kovan/*.ts", + "deploy_polygon/*.ts", + "deploy_mumbai/*.ts", "scripts/*.ts" ] } From 0ea384ac1c7d3d11be50b86af612585c3660a3d9 Mon Sep 17 00:00:00 2001 From: leodinh Date: Fri, 25 Feb 2022 17:05:21 -0500 Subject: [PATCH 03/52] feat: added kovan and polygon deployment scripts --- deploy/001_deploy_contracts_v2.ts | 108 ------------------ deploy/002_setup_polygon.ts | 28 ----- deploy_kovan/001_upgrade_registryV2.ts | 7 +- deploy_kovan/002_reset_strategy.ts | 27 +++++ deploy_kovan/003_rebalance.ts | 15 +++ ...V2.ts => 004_deploy_strategyProviderV2.ts} | 0 ...agerV2.ts => 005_upgrade_riskManagerV2.ts} | 0 ...tv2_usdc.ts => 006_deploy_vaultV2_usdc.ts} | 0 deploy_kovan/008_set_strategy.ts | 40 +++++++ deploy_kovan/009_rebalance.ts | 15 +++ deploy_polygon/003_deploy_riskManagerV2.ts | 1 + deploy_polygon/004_approve_tokens.ts | 40 +++++++ deploy_polygon/004_deploy_aaveadapter.ts | 73 +++--------- deploy_polygon/005_deploy_curveadapters.ts | 47 ++++++++ deploy_polygon/006_deploy_vault_usdc.ts | 53 +++++++++ deploy_polygon/007_deploy_vault_wmatic.ts | 53 +++++++++ helpers/constants/adapters-polygon.ts | 12 +- helpers/data/kovan_aave_tokens.json | 3 + 18 files changed, 326 insertions(+), 196 deletions(-) delete mode 100644 deploy/001_deploy_contracts_v2.ts delete mode 100644 deploy/002_setup_polygon.ts create mode 100644 deploy_kovan/002_reset_strategy.ts create mode 100644 deploy_kovan/003_rebalance.ts rename deploy_kovan/{002_deploy_strategyProviderV2.ts => 004_deploy_strategyProviderV2.ts} (100%) rename deploy_kovan/{004_upgrade_riskManagerV2.ts => 005_upgrade_riskManagerV2.ts} (100%) rename deploy_kovan/{005_deploy_vaultv2_usdc.ts => 006_deploy_vaultV2_usdc.ts} (100%) create mode 100644 deploy_kovan/008_set_strategy.ts create mode 100644 deploy_kovan/009_rebalance.ts create mode 100644 deploy_polygon/004_approve_tokens.ts create mode 100644 helpers/data/kovan_aave_tokens.json diff --git a/deploy/001_deploy_contracts_v2.ts b/deploy/001_deploy_contracts_v2.ts deleted file mode 100644 index f00d7cc8c..000000000 --- a/deploy/001_deploy_contracts_v2.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RegistryProxy, RiskManagerV2, RiskManagerProxy } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = ( - await deploy("RegistryV2", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, - }) - ).address; - - const registryProxyAddress = ( - await deploy("RegistryProxy", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, - }) - ).address; - - const registryProxyContract: RegistryProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) - ); - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress) - ); - - await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); - await registryContract.connect(owner).become(registryProxyAddress); - - const riskManagerAddress = ( - await deploy("RiskManagerV2", { - from: await owner.getAddress(), - args: [registryProxyContract.address], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, - }) - ).address; - - const riskManagerProxyAddress = ( - await deploy("RiskManagerProxy", { - from: await owner.getAddress(), - args: [registryProxyContract.address], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, - }) - ).address; - - const riskManagerProxyContract: RiskManagerProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) - ); - - let riskManagerContract: RiskManagerV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) - ); - - await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); - await riskManagerContract.connect(owner).become(riskManagerProxyAddress); - riskManagerContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerProxyAddress) - ); - - const strategyProviderAddress = ( - await deploy("StrategyProviderV2", { - from: await owner.getAddress(), - args: [registryProxyContract.address], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, - }) - ).address; - - const strategyManagerAddress = ( - await deploy("StrategyManager", { - from: await owner.getAddress(), - args: [registryProxyContract.address], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_MANAGER, - }) - ).address; - - const harvestCodeProviderAddress = ( - await deploy("HarvestCodeProvider", { - from: await owner.getAddress(), - args: [registryProxyContract.address], - log: true, - contract: ESSENTIAL_CONTRACTS.HARVEST_CODE_PROVIDER, - }) - ).address; - console.log("----------------------------------------"); - console.log("Setting essential contracts in RegistryV2"); - await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); - await executeFunc(registryContract, owner, "setHarvestCodeProvider(address)", [harvestCodeProviderAddress]); - await executeFunc(registryContract, owner, "setStrategyManager(address)", [strategyManagerAddress]); - await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); - console.log("Finished deploying all essential contracts"); -}; - -export default func; -func.tags = ["Contracts"]; diff --git a/deploy/002_setup_polygon.ts b/deploy/002_setup_polygon.ts deleted file mode 100644 index 6784be5bc..000000000 --- a/deploy/002_setup_polygon.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ADAPTERS } from "../helpers/constants/adapters-polygon"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { addRiskProfiles } from "../helpers/contracts-actions"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); - - await addRiskProfiles(owner, registryContract); - - for (let i = 0; i < ADAPTERS.length; i = +1) { - const adapter = ADAPTERS[i]; - await deploy(adapter, { - from: await owner.getAddress(), - args: [], - log: true, - contract: adapter, - }); - } -}; - -export default func; -func.tags = ["Polygon"]; diff --git a/deploy_kovan/001_upgrade_registryV2.ts b/deploy_kovan/001_upgrade_registryV2.ts index d0e66857d..89c88e16b 100644 --- a/deploy_kovan/001_upgrade_registryV2.ts +++ b/deploy_kovan/001_upgrade_registryV2.ts @@ -20,13 +20,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, KOVAN.RegistryProxy) ); - const registryContract: RegistryV2 = ( + let registryContract: RegistryV2 = ( await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) ); await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); await registryContract.connect(owner).become(KOVAN.RegistryProxy); + + registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy); + await registryContract.resetV1Contracts(); }; export default func; -func.tags = ["RegistryV2"]; +func.tags = ["RegistryV2_Kovan"]; diff --git a/deploy_kovan/002_reset_strategy.ts b/deploy_kovan/002_reset_strategy.ts new file mode 100644 index 000000000..e11687795 --- /dev/null +++ b/deploy_kovan/002_reset_strategy.ts @@ -0,0 +1,27 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import KOVAN from "../_deployments/kovan.json"; +import { StrategyProvider } from "../typechain"; +import { generateTokenHash } from "../helpers/helpers"; +import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const strategyProviderContract = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, KOVAN.StrategyProvider) + ); + + await strategyProviderContract.setBestDefaultStrategy( + 2, + generateTokenHash([AAVE_TOKENS.USDC]), + hre.ethers.constants.HashZero, + ); + + await strategyProviderContract.setBestStrategy( + 2, + generateTokenHash([AAVE_TOKENS.USDC]), + hre.ethers.constants.HashZero, + ); +}; + +export default func; +func.tags = ["StrategyProviderV2"]; diff --git a/deploy_kovan/003_rebalance.ts b/deploy_kovan/003_rebalance.ts new file mode 100644 index 000000000..15194e8eb --- /dev/null +++ b/deploy_kovan/003_rebalance.ts @@ -0,0 +1,15 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import KOVAN from "../_deployments/kovan.json"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const [owner] = await hre.ethers.getSigners(); + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy, owner); + + await executeFunc(vault, owner, "rebalance()", []); +}; + +export default func; +func.tags = ["Rebalance"]; diff --git a/deploy_kovan/002_deploy_strategyProviderV2.ts b/deploy_kovan/004_deploy_strategyProviderV2.ts similarity index 100% rename from deploy_kovan/002_deploy_strategyProviderV2.ts rename to deploy_kovan/004_deploy_strategyProviderV2.ts diff --git a/deploy_kovan/004_upgrade_riskManagerV2.ts b/deploy_kovan/005_upgrade_riskManagerV2.ts similarity index 100% rename from deploy_kovan/004_upgrade_riskManagerV2.ts rename to deploy_kovan/005_upgrade_riskManagerV2.ts diff --git a/deploy_kovan/005_deploy_vaultv2_usdc.ts b/deploy_kovan/006_deploy_vaultV2_usdc.ts similarity index 100% rename from deploy_kovan/005_deploy_vaultv2_usdc.ts rename to deploy_kovan/006_deploy_vaultV2_usdc.ts diff --git a/deploy_kovan/008_set_strategy.ts b/deploy_kovan/008_set_strategy.ts new file mode 100644 index 000000000..896597ff5 --- /dev/null +++ b/deploy_kovan/008_set_strategy.ts @@ -0,0 +1,40 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { StrategyProviderV2 } from "../typechain"; +import { generateTokenHashV2 } from "../helpers/helpers"; +import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + + const strategyProviderContract = ( + await hre.ethers.getContractAt( + ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, + ( + await deployments.get("StrategyProviderV2") + ).address, + ) + ); + + const AAVE_V2_STRATEGY = [ + { + pool: "0x1E40B561EC587036f9789aF83236f057D1ed2A90", + outputToken: "0xe12AFeC5aa12Cf614678f9bFeeB98cA9Bb95b5B0", + isBorrow: true, + }, + ]; + await strategyProviderContract.setBestDefaultStrategy( + 2, + generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), + AAVE_V2_STRATEGY, + ); + + await strategyProviderContract.setBestStrategy( + 2, + generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), + AAVE_V2_STRATEGY, + ); +}; + +export default func; +func.tags = ["Set_Strategy"]; diff --git a/deploy_kovan/009_rebalance.ts b/deploy_kovan/009_rebalance.ts new file mode 100644 index 000000000..665d73004 --- /dev/null +++ b/deploy_kovan/009_rebalance.ts @@ -0,0 +1,15 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import KOVAN from "../_deployments/kovan.json"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const [owner] = await hre.ethers.getSigners(); + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); + + await executeFunc(vault, owner, "rebalance()", []); +}; + +export default func; +func.tags = ["VaultV2"]; diff --git a/deploy_polygon/003_deploy_riskManagerV2.ts b/deploy_polygon/003_deploy_riskManagerV2.ts index bc1b9d402..a1c788548 100644 --- a/deploy_polygon/003_deploy_riskManagerV2.ts +++ b/deploy_polygon/003_deploy_riskManagerV2.ts @@ -42,6 +42,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); await riskManagerContract.connect(owner).become(riskManagerProxyAddress); + await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); }; diff --git a/deploy_polygon/004_approve_tokens.ts b/deploy_polygon/004_approve_tokens.ts new file mode 100644 index 000000000..409cf0bf2 --- /dev/null +++ b/deploy_polygon/004_approve_tokens.ts @@ -0,0 +1,40 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + + await addRiskProfiles(owner, registryContract); + + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + : []; + const tokens = + tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[hre.network.name][token].address) : []; + + if (tokens.length > 0) { + console.log("Approving Tokens..."); + + await approveAndMapTokenHashToTokensV2( + owner, + registryContract, + tokens, + true, + NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + false, + ); + + console.log("Approved Tokens..."); + } +}; + +export default func; +func.tags = ["ApproveToken"]; diff --git a/deploy_polygon/004_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts index b0ba8f215..933aa9dff 100644 --- a/deploy_polygon/004_deploy_aaveadapter.ts +++ b/deploy_polygon/004_deploy_aaveadapter.ts @@ -1,80 +1,41 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { ADAPTERS as POLYGON_ADAPTERS } from "../helpers/constants/adapters-polygon"; -import { ADAPTERS as ETHEREUM_ADAPTERS } from "../helpers/constants/adapters"; +import { AAVE_ADAPTER_NAME } from "../helpers/constants/adapters-polygon"; import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; -import { DEFI_POOLS_DATA } from "../helpers/type"; -import { - addRiskProfiles, - approveAndMapTokenHashToTokensV2, - approveLiquidityPoolAndMapAdaptersV2, -} from "../helpers/contracts-actions"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; - const adapters = ["polygon", "mumbai"].includes(hre.network.name) ? POLYGON_ADAPTERS : ETHEREUM_ADAPTERS; - const deployedAdapters: { [adapterName: string]: string } = {}; - for (let i = 0; i < adapters.length; i = +1) { - const adapter = adapters[i]; - deployedAdapters[adapter] = ( - await deploy(adapter, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: adapter, - }) - ).address; - } - console.log("Deployed Adapters."); - console.log("----------------------"); + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const adapter = ( + await deploy(AAVE_ADAPTER_NAME, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: AAVE_ADAPTER_NAME, + }) + ).address; const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) : []; - const tokens = - tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[hre.network.name][token].address) : []; - if (tokens.length > 0) { - console.log("Approving Tokens..."); + const liquidityPoolsAddressesMapAdapter: string[][] = []; - await approveAndMapTokenHashToTokensV2( + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2( owner, registryContract, - tokens, - true, - NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + [], + tokenKeys.map(token => [adapter, PolygonDefiPools[AAVE_ADAPTER_NAME.split("Adapter")[0]][token].lpToken]), false, ); } - - let adapterMapliquidityPools: DEFI_POOLS_DATA = {}; - switch (hre.network.name) { - case eEVMNetwork.polygon: { - adapterMapliquidityPools = PolygonDefiPools; - break; - } - default: - break; - } - let liquidityPoolsAddressesMapAdapter: string[][] = []; - const protocolNames = Object.keys(adapterMapliquidityPools); - for (let i = 0; i < protocolNames.length; i++) { - const adapterName = `${protocolNames[i]}Adapter`; - const liquidityPools = adapterMapliquidityPools[protocolNames[i]]; - const poolAddressesWithAdapter = tokenKeys.map(token => [ - deployedAdapters[adapterName], - liquidityPools[token].lpToken, - ]); - liquidityPoolsAddressesMapAdapter = poolAddressesWithAdapter; - } - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } }; export default func; diff --git a/deploy_polygon/005_deploy_curveadapters.ts b/deploy_polygon/005_deploy_curveadapters.ts index e69de29bb..f20106908 100644 --- a/deploy_polygon/005_deploy_curveadapters.ts +++ b/deploy_polygon/005_deploy_curveadapters.ts @@ -0,0 +1,47 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_ADAPTERS, CURVE_PROTOCOLS } from "../helpers/constants/adapters-polygon"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const curveAdapters: { [name: string]: string } = {}; + for (let i = 0; i < CURVE_ADAPTERS.length; i++) { + curveAdapters[CURVE_ADAPTERS[i]] = ( + await deploy(CURVE_ADAPTERS[i], { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_ADAPTERS[i], + }) + ).address; + } + + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + : []; + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let i = 0; i < CURVE_ADAPTERS.length; i += 1) { + for (let j = 0; j < tokenKeys.length; j += 1) { + liquidityPoolsAddressesMapAdapter.push([ + PolygonDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]].lpToken, + curveAdapters[CURVE_ADAPTERS[i]], + ]); + } + } + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["Setup"]; diff --git a/deploy_polygon/006_deploy_vault_usdc.ts b/deploy_polygon/006_deploy_vault_usdc.ts index e69de29bb..36e2140c0 100644 --- a/deploy_polygon/006_deploy_vault_usdc.ts +++ b/deploy_polygon/006_deploy_vault_usdc.ts @@ -0,0 +1,53 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import { RISK_PROFILES } from "../helpers/constants/contracts-data"; +import KOVAN from "../_deployments/kovan.json"; +import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner, admin] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskProfileCode = 2; + const underlyingToken = PolygonLegos.tokens.USDC; + const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); + const underlyingTokenName = await tokenContract.name(); + const underlyingTokenSymbol = await tokenContract.symbol(); + const vaultAddress = ( + await deploy("VaultUSDCV2", { + from: await owner.getAddress(), + args: [ + KOVAN.RegistryProxy, + underlyingTokenName, + underlyingTokenSymbol, + RISK_PROFILES[riskProfileCode].name, + RISK_PROFILES[riskProfileCode].symbol, + ], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_V2, + }) + ).address; + + const vaultProxyAddress = ( + await deploy("VaultUSDCProxyV2", { + from: await owner.getAddress(), + args: [vaultAddress, await admin.getAddress(), "0x"], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, + }) + ).address; + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + + await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + KOVAN.RegistryProxy, + underlyingToken, + underlyingTokenName, + underlyingTokenSymbol, + riskProfileCode, + ]); +}; + +export default func; +func.tags = ["VaultUSDCV2"]; diff --git a/deploy_polygon/007_deploy_vault_wmatic.ts b/deploy_polygon/007_deploy_vault_wmatic.ts index e69de29bb..b8f4dd071 100644 --- a/deploy_polygon/007_deploy_vault_wmatic.ts +++ b/deploy_polygon/007_deploy_vault_wmatic.ts @@ -0,0 +1,53 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import { RISK_PROFILES } from "../helpers/constants/contracts-data"; +import KOVAN from "../_deployments/kovan.json"; +import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner, admin] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskProfileCode = 2; + const underlyingToken = PolygonLegos.tokens.WMATIC; + const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); + const underlyingTokenName = await tokenContract.name(); + const underlyingTokenSymbol = await tokenContract.symbol(); + const vaultAddress = ( + await deploy("VaultWMATICV2", { + from: await owner.getAddress(), + args: [ + KOVAN.RegistryProxy, + underlyingTokenName, + underlyingTokenSymbol, + RISK_PROFILES[riskProfileCode].name, + RISK_PROFILES[riskProfileCode].symbol, + ], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_V2, + }) + ).address; + + const vaultProxyAddress = ( + await deploy("VaultUSDCProxyV2", { + from: await owner.getAddress(), + args: [vaultAddress, await admin.getAddress(), "0x"], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, + }) + ).address; + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + + await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + KOVAN.RegistryProxy, + underlyingToken, + underlyingTokenName, + underlyingTokenSymbol, + riskProfileCode, + ]); +}; + +export default func; +func.tags = ["VaultWMATICV2"]; diff --git a/helpers/constants/adapters-polygon.ts b/helpers/constants/adapters-polygon.ts index 7508743c7..bdcec3dea 100644 --- a/helpers/constants/adapters-polygon.ts +++ b/helpers/constants/adapters-polygon.ts @@ -1,6 +1,14 @@ export const AAVE_ADAPTER_NAME: string = "AaveAdapter"; export const CURVE_STABLE_SWAP_ADAPTER: string = "CurveStableSwapAdapter"; export const CURVE_GAUGE_ADAPTER: string = "CurveGaugeAdapter"; +export const CURVE_METAPOOL_FACTORY_ADAPTER: string = "CurveMetapoolFactoryAdapter"; -export const ADAPTERS = [AAVE_ADAPTER_NAME, CURVE_STABLE_SWAP_ADAPTER, CURVE_GAUGE_ADAPTER]; -export const PROTOCOLS = ADAPTERS.map(item => item.split("Adapter")[0]); +export const CURVE_ADAPTERS = [CURVE_STABLE_SWAP_ADAPTER, CURVE_GAUGE_ADAPTER, CURVE_METAPOOL_FACTORY_ADAPTER]; + +export const CURVE_PROTOCOLS = CURVE_ADAPTERS.map(item => + item === CURVE_METAPOOL_FACTORY_ADAPTER ? "CurveFactoryMetaPool" : item.split("Adapter")[0], +); + +export const ADAPTERS = [AAVE_ADAPTER_NAME, ...CURVE_ADAPTERS]; + +export const PROTOCOLS = [AAVE_ADAPTER_NAME.split("Adapter")[0], ...CURVE_PROTOCOLS]; diff --git a/helpers/data/kovan_aave_tokens.json b/helpers/data/kovan_aave_tokens.json new file mode 100644 index 000000000..6a756a399 --- /dev/null +++ b/helpers/data/kovan_aave_tokens.json @@ -0,0 +1,3 @@ +{ + "USDC": "0xe22da380ee6B445bb8273C81944ADEB6E8450422" +} From c7ae43f047d146f8fbb9d143734fb56480f125c9 Mon Sep 17 00:00:00 2001 From: leodinh Date: Sat, 26 Feb 2022 01:09:09 -0500 Subject: [PATCH 04/52] feat: added mumbai deployment scripts --- deploy_kovan/002_reset_strategy.ts | 2 +- deploy_kovan/009_rebalance.ts | 2 +- deploy_mumbai/001_deploy_registryV2.ts | 40 ++++++++++++++ .../002_deploy_strategyProviderV2.ts | 30 +++++++++++ deploy_mumbai/003_deploy_riskManagerV2.ts | 50 +++++++++++++++++ deploy_mumbai/004_approve_tokens.ts | 38 +++++++++++++ deploy_mumbai/005_deploy_aaveadapter.ts | 41 ++++++++++++++ deploy_mumbai/006_deploy_curveadapters.ts | 47 ++++++++++++++++ .../007_deploy_vault_usdc.ts | 6 +-- .../008_deploy_vault_wmatic.ts | 6 +-- ...veadapter.ts => 005_deploy_aaveadapter.ts} | 2 +- ...dapters.ts => 006_deploy_curveadapters.ts} | 10 ++-- deploy_polygon/007_deploy_vault_usdc.ts | 53 +++++++++++++++++++ deploy_polygon/008_deploy_vault_wmatic.ts | 53 +++++++++++++++++++ helpers/data/index.ts | 2 + helpers/data/mumbai_tokens.json | 4 ++ helpers/data/polygon_defiPools.ts | 24 ++++++++- 17 files changed, 396 insertions(+), 14 deletions(-) create mode 100644 deploy_mumbai/001_deploy_registryV2.ts create mode 100644 deploy_mumbai/002_deploy_strategyProviderV2.ts create mode 100644 deploy_mumbai/003_deploy_riskManagerV2.ts create mode 100644 deploy_mumbai/004_approve_tokens.ts create mode 100644 deploy_mumbai/005_deploy_aaveadapter.ts create mode 100644 deploy_mumbai/006_deploy_curveadapters.ts rename deploy_polygon/006_deploy_vault_usdc.ts => deploy_mumbai/007_deploy_vault_usdc.ts (93%) rename deploy_polygon/007_deploy_vault_wmatic.ts => deploy_mumbai/008_deploy_vault_wmatic.ts (93%) rename deploy_polygon/{004_deploy_aaveadapter.ts => 005_deploy_aaveadapter.ts} (96%) rename deploy_polygon/{005_deploy_curveadapters.ts => 006_deploy_curveadapters.ts} (86%) create mode 100644 deploy_polygon/007_deploy_vault_usdc.ts create mode 100644 deploy_polygon/008_deploy_vault_wmatic.ts create mode 100644 helpers/data/mumbai_tokens.json diff --git a/deploy_kovan/002_reset_strategy.ts b/deploy_kovan/002_reset_strategy.ts index e11687795..42a3fddce 100644 --- a/deploy_kovan/002_reset_strategy.ts +++ b/deploy_kovan/002_reset_strategy.ts @@ -24,4 +24,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["StrategyProviderV2"]; +func.tags = ["Reset_Strategy"]; diff --git a/deploy_kovan/009_rebalance.ts b/deploy_kovan/009_rebalance.ts index 665d73004..90be0db91 100644 --- a/deploy_kovan/009_rebalance.ts +++ b/deploy_kovan/009_rebalance.ts @@ -12,4 +12,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["VaultV2"]; +func.tags = ["Rebalance"]; diff --git a/deploy_mumbai/001_deploy_registryV2.ts b/deploy_mumbai/001_deploy_registryV2.ts new file mode 100644 index 000000000..9ca2b5c34 --- /dev/null +++ b/deploy_mumbai/001_deploy_registryV2.ts @@ -0,0 +1,40 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RegistryProxy } from "../typechain"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = ( + await deploy("RegistryV2", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, + }) + ).address; + const registryProxyAddress = ( + await deploy("RegistryProxy", { + from: await owner.getAddress(), + args: [], + log: true, + contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, + }) + ).address; + + const registryProxyContract: RegistryProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) + ); + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); + await registryContract.connect(owner).become(registryProxyAddress); +}; + +export default func; +func.tags = ["RegistryV2"]; diff --git a/deploy_mumbai/002_deploy_strategyProviderV2.ts b/deploy_mumbai/002_deploy_strategyProviderV2.ts new file mode 100644 index 000000000..a17da1325 --- /dev/null +++ b/deploy_mumbai/002_deploy_strategyProviderV2.ts @@ -0,0 +1,30 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2 } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + const strategyProviderAddress = ( + await deploy("StrategyProviderV2", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, + }) + ).address; + + await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); +}; + +export default func; +func.tags = ["StrategyProviderV2", "Polygon"]; diff --git a/deploy_mumbai/003_deploy_riskManagerV2.ts b/deploy_mumbai/003_deploy_riskManagerV2.ts new file mode 100644 index 000000000..a1c788548 --- /dev/null +++ b/deploy_mumbai/003_deploy_riskManagerV2.ts @@ -0,0 +1,50 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { RegistryV2, RiskManagerV2, RiskManagerProxy } from "../typechain"; +import { executeFunc } from "../helpers/helpers"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + + const registryContract: RegistryV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) + ); + + const riskManagerAddress = ( + await deploy("RiskManagerV2", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, + }) + ).address; + + const riskManagerProxyAddress = ( + await deploy("RiskManagerProxy", { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, + }) + ).address; + + const riskManagerProxyContract: RiskManagerProxy = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) + ); + + const riskManagerContract: RiskManagerV2 = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) + ); + + await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); + await riskManagerContract.connect(owner).become(riskManagerProxyAddress); + + await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); +}; + +export default func; +func.tags = ["RegistryV2"]; diff --git a/deploy_mumbai/004_approve_tokens.ts b/deploy_mumbai/004_approve_tokens.ts new file mode 100644 index 000000000..535e81416 --- /dev/null +++ b/deploy_mumbai/004_approve_tokens.ts @@ -0,0 +1,38 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; +import { TypedMumbaiTokens } from "../helpers/data"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + + await addRiskProfiles(owner, registryContract); + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const tokens = tokenKeys.length > 0 ? tokenKeys.map(token => TypedMumbaiTokens[token]) : []; + + if (tokens.length > 0) { + console.log("Approving Tokens..."); + + await approveAndMapTokenHashToTokensV2( + owner, + registryContract, + tokens, + true, + NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + false, + ); + + console.log("Approved Tokens..."); + } +}; + +export default func; +func.tags = ["ApproveToken"]; diff --git a/deploy_mumbai/005_deploy_aaveadapter.ts b/deploy_mumbai/005_deploy_aaveadapter.ts new file mode 100644 index 000000000..2ce1829c5 --- /dev/null +++ b/deploy_mumbai/005_deploy_aaveadapter.ts @@ -0,0 +1,41 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { AAVE_ADAPTER_NAME } from "../helpers/constants/adapters-polygon"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; +import { TypedMumbaiTokens } from "../helpers/data"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const adapter = ( + await deploy(AAVE_ADAPTER_NAME, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: AAVE_ADAPTER_NAME, + }) + ).address; + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2( + owner, + registryContract, + [], + tokenKeys.map(token => [adapter, TypedMumbaiDefiPools[AAVE_ADAPTER_NAME][token].lpToken]), + false, + ); + } +}; + +export default func; +func.tags = ["Setup"]; diff --git a/deploy_mumbai/006_deploy_curveadapters.ts b/deploy_mumbai/006_deploy_curveadapters.ts new file mode 100644 index 000000000..2c185be67 --- /dev/null +++ b/deploy_mumbai/006_deploy_curveadapters.ts @@ -0,0 +1,47 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_ADAPTERS, CURVE_PROTOCOLS } from "../helpers/constants/adapters-polygon"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; +import { TypedMumbaiTokens } from "../helpers/data"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const curveAdapters: { [name: string]: string } = {}; + for (let i = 0; i < CURVE_ADAPTERS.length; i++) { + curveAdapters[CURVE_ADAPTERS[i]] = ( + await deploy(CURVE_ADAPTERS[i], { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_ADAPTERS[i], + }) + ).address; + } + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let i = 0; i < CURVE_ADAPTERS.length; i += 1) { + for (let j = 0; j < tokenKeys.length; j += 1) { + if (TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]] && TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]]) { + liquidityPoolsAddressesMapAdapter.push([ + TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]].lpToken, + curveAdapters[CURVE_ADAPTERS[i]], + ]); + } + } + } + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["Setup"]; diff --git a/deploy_polygon/006_deploy_vault_usdc.ts b/deploy_mumbai/007_deploy_vault_usdc.ts similarity index 93% rename from deploy_polygon/006_deploy_vault_usdc.ts rename to deploy_mumbai/007_deploy_vault_usdc.ts index 36e2140c0..3027feaad 100644 --- a/deploy_polygon/006_deploy_vault_usdc.ts +++ b/deploy_mumbai/007_deploy_vault_usdc.ts @@ -3,13 +3,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { executeFunc } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import KOVAN from "../_deployments/kovan.json"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; const riskProfileCode = 2; + const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = PolygonLegos.tokens.USDC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); @@ -18,7 +18,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await deploy("VaultUSDCV2", { from: await owner.getAddress(), args: [ - KOVAN.RegistryProxy, + registryAddress, underlyingTokenName, underlyingTokenSymbol, RISK_PROFILES[riskProfileCode].name, @@ -41,7 +41,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ - KOVAN.RegistryProxy, + registryAddress, underlyingToken, underlyingTokenName, underlyingTokenSymbol, diff --git a/deploy_polygon/007_deploy_vault_wmatic.ts b/deploy_mumbai/008_deploy_vault_wmatic.ts similarity index 93% rename from deploy_polygon/007_deploy_vault_wmatic.ts rename to deploy_mumbai/008_deploy_vault_wmatic.ts index b8f4dd071..4498ffbff 100644 --- a/deploy_polygon/007_deploy_vault_wmatic.ts +++ b/deploy_mumbai/008_deploy_vault_wmatic.ts @@ -3,13 +3,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { executeFunc } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import KOVAN from "../_deployments/kovan.json"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; const riskProfileCode = 2; + const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = PolygonLegos.tokens.WMATIC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); @@ -18,7 +18,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await deploy("VaultWMATICV2", { from: await owner.getAddress(), args: [ - KOVAN.RegistryProxy, + registryAddress, underlyingTokenName, underlyingTokenSymbol, RISK_PROFILES[riskProfileCode].name, @@ -41,7 +41,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ - KOVAN.RegistryProxy, + registryAddress, underlyingToken, underlyingTokenName, underlyingTokenSymbol, diff --git a/deploy_polygon/004_deploy_aaveadapter.ts b/deploy_polygon/005_deploy_aaveadapter.ts similarity index 96% rename from deploy_polygon/004_deploy_aaveadapter.ts rename to deploy_polygon/005_deploy_aaveadapter.ts index 933aa9dff..e8407a9de 100644 --- a/deploy_polygon/004_deploy_aaveadapter.ts +++ b/deploy_polygon/005_deploy_aaveadapter.ts @@ -32,7 +32,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { owner, registryContract, [], - tokenKeys.map(token => [adapter, PolygonDefiPools[AAVE_ADAPTER_NAME.split("Adapter")[0]][token].lpToken]), + tokenKeys.map(token => [adapter, PolygonDefiPools[AAVE_ADAPTER_NAME][token].lpToken]), false, ); } diff --git a/deploy_polygon/005_deploy_curveadapters.ts b/deploy_polygon/006_deploy_curveadapters.ts similarity index 86% rename from deploy_polygon/005_deploy_curveadapters.ts rename to deploy_polygon/006_deploy_curveadapters.ts index f20106908..4f95877ed 100644 --- a/deploy_polygon/005_deploy_curveadapters.ts +++ b/deploy_polygon/006_deploy_curveadapters.ts @@ -32,10 +32,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { for (let i = 0; i < CURVE_ADAPTERS.length; i += 1) { for (let j = 0; j < tokenKeys.length; j += 1) { - liquidityPoolsAddressesMapAdapter.push([ - PolygonDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]].lpToken, - curveAdapters[CURVE_ADAPTERS[i]], - ]); + if (PolygonDefiPools[CURVE_ADAPTERS[i]] && PolygonDefiPools[CURVE_ADAPTERS[i]][tokenKeys[j]]) { + liquidityPoolsAddressesMapAdapter.push([ + PolygonDefiPools[CURVE_ADAPTERS[i]][tokenKeys[j]].lpToken, + curveAdapters[CURVE_ADAPTERS[i]], + ]); + } } } if (liquidityPoolsAddressesMapAdapter.length > 0) { diff --git a/deploy_polygon/007_deploy_vault_usdc.ts b/deploy_polygon/007_deploy_vault_usdc.ts new file mode 100644 index 000000000..3027feaad --- /dev/null +++ b/deploy_polygon/007_deploy_vault_usdc.ts @@ -0,0 +1,53 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import { RISK_PROFILES } from "../helpers/constants/contracts-data"; +import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner, admin] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskProfileCode = 2; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const underlyingToken = PolygonLegos.tokens.USDC; + const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); + const underlyingTokenName = await tokenContract.name(); + const underlyingTokenSymbol = await tokenContract.symbol(); + const vaultAddress = ( + await deploy("VaultUSDCV2", { + from: await owner.getAddress(), + args: [ + registryAddress, + underlyingTokenName, + underlyingTokenSymbol, + RISK_PROFILES[riskProfileCode].name, + RISK_PROFILES[riskProfileCode].symbol, + ], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_V2, + }) + ).address; + + const vaultProxyAddress = ( + await deploy("VaultUSDCProxyV2", { + from: await owner.getAddress(), + args: [vaultAddress, await admin.getAddress(), "0x"], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, + }) + ).address; + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + + await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + registryAddress, + underlyingToken, + underlyingTokenName, + underlyingTokenSymbol, + riskProfileCode, + ]); +}; + +export default func; +func.tags = ["VaultUSDCV2"]; diff --git a/deploy_polygon/008_deploy_vault_wmatic.ts b/deploy_polygon/008_deploy_vault_wmatic.ts new file mode 100644 index 000000000..4498ffbff --- /dev/null +++ b/deploy_polygon/008_deploy_vault_wmatic.ts @@ -0,0 +1,53 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { executeFunc } from "../helpers/helpers"; +import { RISK_PROFILES } from "../helpers/constants/contracts-data"; +import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner, admin] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const riskProfileCode = 2; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const underlyingToken = PolygonLegos.tokens.WMATIC; + const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); + const underlyingTokenName = await tokenContract.name(); + const underlyingTokenSymbol = await tokenContract.symbol(); + const vaultAddress = ( + await deploy("VaultWMATICV2", { + from: await owner.getAddress(), + args: [ + registryAddress, + underlyingTokenName, + underlyingTokenSymbol, + RISK_PROFILES[riskProfileCode].name, + RISK_PROFILES[riskProfileCode].symbol, + ], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_V2, + }) + ).address; + + const vaultProxyAddress = ( + await deploy("VaultUSDCProxyV2", { + from: await owner.getAddress(), + args: [vaultAddress, await admin.getAddress(), "0x"], + log: true, + contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, + }) + ).address; + + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + + await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + registryAddress, + underlyingToken, + underlyingTokenName, + underlyingTokenSymbol, + riskProfileCode, + ]); +}; + +export default func; +func.tags = ["VaultWMATICV2"]; diff --git a/helpers/data/index.ts b/helpers/data/index.ts index 7fb979c7e..921bc3749 100644 --- a/helpers/data/index.ts +++ b/helpers/data/index.ts @@ -7,6 +7,7 @@ import { default as TokenHolders } from "./token_holders.json"; import { default as Contracts } from "./contracts.json"; import { default as EOA } from "./eoa.json"; import { default as TokenStrategies } from "./tokenStrategies.json"; +import { default as MumbaiTokens } from "./mumbai_tokens.json"; import { STRATEGY, DATA_OBJECT, MULTI_ASSET_TOKEN_DATA, CURVE_TOKEN_DATA, TOKEN_STRATEGIES } from "../type"; @@ -19,3 +20,4 @@ export const TypedTokenHolders = TokenHolders as DATA_OBJECT; export const TypedContracts = Contracts as DATA_OBJECT; export const TypedEOA = EOA as DATA_OBJECT; export const TypedTokenStrategies = TokenStrategies as TOKEN_STRATEGIES; +export const TypedMumbaiTokens = MumbaiTokens as DATA_OBJECT; diff --git a/helpers/data/mumbai_tokens.json b/helpers/data/mumbai_tokens.json new file mode 100644 index 000000000..76f8ed7ac --- /dev/null +++ b/helpers/data/mumbai_tokens.json @@ -0,0 +1,4 @@ +{ + "USDC": "0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e", + "WMATIC": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889" +} diff --git a/helpers/data/polygon_defiPools.ts b/helpers/data/polygon_defiPools.ts index 8c028382e..0b0cf8bc9 100644 --- a/helpers/data/polygon_defiPools.ts +++ b/helpers/data/polygon_defiPools.ts @@ -1,7 +1,13 @@ import { default as AaveDefiPools } from "optyfi-sdk/polygon/pools/Aave.json"; import { default as CurveGaugeDefiPools } from "optyfi-sdk/polygon/pools/CurveGauge.json"; import { default as CurveStableSwapDefiPools } from "optyfi-sdk/polygon/pools/CurveStableSwap.json"; -import { AAVE_ADAPTER_NAME, CURVE_GAUGE_ADAPTER, CURVE_STABLE_SWAP_ADAPTER } from "../constants/adapters-polygon"; +import { default as CurveFactoryMetaPool } from "optyfi-sdk/polygon/pools/CurveFactoryMetaPool.json"; +import { + AAVE_ADAPTER_NAME, + CURVE_GAUGE_ADAPTER, + CURVE_STABLE_SWAP_ADAPTER, + CURVE_METAPOOL_FACTORY_ADAPTER, +} from "../constants/adapters-polygon"; import { DEFI_POOLS_DATA } from "../type"; @@ -9,4 +15,20 @@ export const TypedDefiPools: DEFI_POOLS_DATA = { [AAVE_ADAPTER_NAME]: AaveDefiPools, [CURVE_GAUGE_ADAPTER]: CurveGaugeDefiPools, [CURVE_STABLE_SWAP_ADAPTER]: CurveStableSwapDefiPools, + [CURVE_METAPOOL_FACTORY_ADAPTER]: CurveFactoryMetaPool, +}; + +export const TypedMumbaiDefiPools: DEFI_POOLS_DATA = { + [AAVE_ADAPTER_NAME]: { + usdc: { + pool: "0xE6ef11C967898F9525D550014FDEdCFAB63536B5", + lpToken: "0x2271e3Fef9e15046d09E1d78a8FF038c691E9Cf9", + tokens: ["0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e"], + }, + wmatic: { + pool: "0xE6ef11C967898F9525D550014FDEdCFAB63536B5", + lpToken: "0xF45444171435d0aCB08a8af493837eF18e86EE27", + tokens: ["0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"], + }, + }, }; From 4933ce965d3565e52675a7dfb1bab6a5f520bcf5 Mon Sep 17 00:00:00 2001 From: leodinh Date: Sat, 26 Feb 2022 23:56:56 -0500 Subject: [PATCH 05/52] feat: finished deployment scripts --- deploy_kovan/004_deploy_strategyProviderV2.ts | 2 +- deploy_mumbai/004_approve_tokens.ts | 7 +++--- deploy_mumbai/005_deploy_aaveadapter.ts | 3 +-- deploy_mumbai/006_deploy_curveadapters.ts | 2 +- deploy_mumbai/007_deploy_vault_usdc.ts | 11 +++++---- deploy_mumbai/008_deploy_vault_wmatic.ts | 11 +++++---- deploy_polygon/004_approve_tokens.ts | 13 +++++------ deploy_polygon/005_deploy_aaveadapter.ts | 2 +- deploy_polygon/006_deploy_curveadapters.ts | 2 +- deploy_polygon/007_deploy_vault_usdc.ts | 6 +++-- deploy_polygon/008_deploy_vault_wmatic.ts | 9 +++++--- hardhat.config.ts | 3 +++ helper-hardhat-config.ts | 5 ++++ helpers/constants/tokens.ts | 8 +++---- optyfi-sdk/config.ts | 23 ++++++++++++++----- scripts/optyfi-sdk.ts | 4 ++-- 16 files changed, 69 insertions(+), 42 deletions(-) diff --git a/deploy_kovan/004_deploy_strategyProviderV2.ts b/deploy_kovan/004_deploy_strategyProviderV2.ts index b88acae1c..a31d4ff28 100644 --- a/deploy_kovan/004_deploy_strategyProviderV2.ts +++ b/deploy_kovan/004_deploy_strategyProviderV2.ts @@ -20,7 +20,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ).address; const registryContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, KOVAN.RegistryProxy) + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy) ); await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); diff --git a/deploy_mumbai/004_approve_tokens.ts b/deploy_mumbai/004_approve_tokens.ts index 535e81416..3490e1166 100644 --- a/deploy_mumbai/004_approve_tokens.ts +++ b/deploy_mumbai/004_approve_tokens.ts @@ -1,7 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID, eEVMNetwork } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; import { TypedMumbaiTokens } from "../helpers/data"; @@ -10,7 +9,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); await addRiskProfiles(owner, registryContract); @@ -26,7 +25,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { registryContract, tokens, true, - NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + NETWORKS_CHAIN_ID.mumbai.toString(), false, ); diff --git a/deploy_mumbai/005_deploy_aaveadapter.ts b/deploy_mumbai/005_deploy_aaveadapter.ts index 2ce1829c5..6416753ac 100644 --- a/deploy_mumbai/005_deploy_aaveadapter.ts +++ b/deploy_mumbai/005_deploy_aaveadapter.ts @@ -1,7 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { AAVE_ADAPTER_NAME } from "../helpers/constants/adapters-polygon"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; @@ -12,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); const adapter = ( await deploy(AAVE_ADAPTER_NAME, { from: await owner.getAddress(), diff --git a/deploy_mumbai/006_deploy_curveadapters.ts b/deploy_mumbai/006_deploy_curveadapters.ts index 2c185be67..d03319910 100644 --- a/deploy_mumbai/006_deploy_curveadapters.ts +++ b/deploy_mumbai/006_deploy_curveadapters.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); const curveAdapters: { [name: string]: string } = {}; for (let i = 0; i < CURVE_ADAPTERS.length; i++) { curveAdapters[CURVE_ADAPTERS[i]] = ( diff --git a/deploy_mumbai/007_deploy_vault_usdc.ts b/deploy_mumbai/007_deploy_vault_usdc.ts index 3027feaad..13dd0c642 100644 --- a/deploy_mumbai/007_deploy_vault_usdc.ts +++ b/deploy_mumbai/007_deploy_vault_usdc.ts @@ -1,16 +1,18 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; +import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { TypedMumbaiTokens } from "../helpers/data"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; const riskProfileCode = 2; const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = PolygonLegos.tokens.USDC; + const underlyingToken = TypedMumbaiTokens.USDC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); @@ -40,9 +42,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.mumbai.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_mumbai/008_deploy_vault_wmatic.ts b/deploy_mumbai/008_deploy_vault_wmatic.ts index 4498ffbff..83d0ffa1f 100644 --- a/deploy_mumbai/008_deploy_vault_wmatic.ts +++ b/deploy_mumbai/008_deploy_vault_wmatic.ts @@ -1,16 +1,18 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; +import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +import { TypedMumbaiTokens } from "../helpers/data"; +import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; const riskProfileCode = 2; const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = PolygonLegos.tokens.WMATIC; + const underlyingToken = TypedMumbaiTokens.WMATIC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); @@ -40,9 +42,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.mumbai.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_polygon/004_approve_tokens.ts b/deploy_polygon/004_approve_tokens.ts index 409cf0bf2..a249f0e37 100644 --- a/deploy_polygon/004_approve_tokens.ts +++ b/deploy_polygon/004_approve_tokens.ts @@ -1,7 +1,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { NETWORKS_CHAIN_ID_HASH, eEVMNetwork } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID, eEVMNetwork } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; @@ -10,16 +10,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); await addRiskProfiles(owner, registryContract); - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon]) : []; const tokens = - tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[hre.network.name][token].address) : []; - + tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon][token].address) : []; if (tokens.length > 0) { console.log("Approving Tokens..."); @@ -28,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { registryContract, tokens, true, - NETWORKS_CHAIN_ID_HASH[hre.network.name as eEVMNetwork], + NETWORKS_CHAIN_ID.polygon.toString(), false, ); diff --git a/deploy_polygon/005_deploy_aaveadapter.ts b/deploy_polygon/005_deploy_aaveadapter.ts index e8407a9de..a8fc8bde9 100644 --- a/deploy_polygon/005_deploy_aaveadapter.ts +++ b/deploy_polygon/005_deploy_aaveadapter.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); const adapter = ( await deploy(AAVE_ADAPTER_NAME, { from: await owner.getAddress(), diff --git a/deploy_polygon/006_deploy_curveadapters.ts b/deploy_polygon/006_deploy_curveadapters.ts index 4f95877ed..b0ee96183 100644 --- a/deploy_polygon/006_deploy_curveadapters.ts +++ b/deploy_polygon/006_deploy_curveadapters.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); const curveAdapters: { [name: string]: string } = {}; for (let i = 0; i < CURVE_ADAPTERS.length; i++) { curveAdapters[CURVE_ADAPTERS[i]] = ( diff --git a/deploy_polygon/007_deploy_vault_usdc.ts b/deploy_polygon/007_deploy_vault_usdc.ts index 3027feaad..1dccbc7b3 100644 --- a/deploy_polygon/007_deploy_vault_usdc.ts +++ b/deploy_polygon/007_deploy_vault_usdc.ts @@ -1,9 +1,10 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; +import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); @@ -40,9 +41,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_polygon/008_deploy_vault_wmatic.ts b/deploy_polygon/008_deploy_vault_wmatic.ts index 4498ffbff..21af6500b 100644 --- a/deploy_polygon/008_deploy_vault_wmatic.ts +++ b/deploy_polygon/008_deploy_vault_wmatic.ts @@ -1,9 +1,11 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; +import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; +import { eEVMNetwork, NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); @@ -30,7 +32,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ).address; const vaultProxyAddress = ( - await deploy("VaultUSDCProxyV2", { + await deploy("VaultWMATICProxyV2", { from: await owner.getAddress(), args: [vaultAddress, await admin.getAddress(), "0x"], log: true, @@ -40,9 +42,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/hardhat.config.ts b/hardhat.config.ts index b6db81ec9..18a468f56 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -62,6 +62,7 @@ const getCommonNetworkConfig = (networkName: eEVMNetwork, networkId: number): Ne initialIndex: 0, count: 20, }, + deploy: [`deploy_${networkName}`], }); const config: HardhatUserConfig = { @@ -113,6 +114,7 @@ const config: HardhatUserConfig = { }, kovan: getCommonNetworkConfig(eEVMNetwork.kovan, NETWORKS_CHAIN_ID[eEVMNetwork.kovan]), polygon: getCommonNetworkConfig(eEVMNetwork.polygon, NETWORKS_CHAIN_ID[eEVMNetwork.polygon]), + mumbai: getCommonNetworkConfig(eEVMNetwork.mumbai, NETWORKS_CHAIN_ID[eEVMNetwork.mumbai]), hardhat: { hardfork: "london", initialBaseFeePerGas: 1_00_000_000, @@ -127,6 +129,7 @@ const config: HardhatUserConfig = { count: 20, accountsBalance: "1000000000000000000000000000", }, + deploy: [`deploy_${FORK}`], }, }, paths: { diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index 0d286706c..e69a4e12f 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -13,6 +13,7 @@ export enum eEVMNetwork { polygon = "polygon", avalanche = "avalanche", ganache = "ganache", + mumbai = "mumbai", } export type iEVMParamsPerNetwork = { @@ -28,6 +29,7 @@ export const NETWORKS_CHAIN_ID: iEVMParamsPerNetwork = { [eEVMNetwork.avalanche]: 43114, [eEVMNetwork.staging]: 1337, [eEVMNetwork.ganache]: 1337, + [eEVMNetwork.mumbai]: 80001, }; export const NETWORKS_RPC_URL: iEVMParamsPerNetwork = { @@ -38,6 +40,7 @@ export const NETWORKS_RPC_URL: iEVMParamsPerNetwork = { [eEVMNetwork.polygon]: process.env.POLYGON_NODE_URL ? process.env.POLYGON_NODE_URL : "", [eEVMNetwork.matic]: process.env.MATIC_NODE_URL ? process.env.MATIC_NODE_URL : "", [eEVMNetwork.avalanche]: process.env.AVALANCHE_NODE_URL ? process.env.AVALANCHE_NODE_URL : "", + [eEVMNetwork.mumbai]: process.env.MUMBAI_NODE_URL ? process.env.MUMBAI_NODE_URL : "", [eEVMNetwork.ganache]: "http://localhost:8545", }; @@ -49,6 +52,7 @@ export const NETWORKS_DEFAULT_GAS: iEVMParamsPerNetwork = { [eEVMNetwork.matic]: 65 * GWEI, [eEVMNetwork.polygon]: 65 * GWEI, [eEVMNetwork.avalanche]: 65 * GWEI, + [eEVMNetwork.mumbai]: 65 * GWEI, [eEVMNetwork.ganache]: "auto", }; @@ -61,6 +65,7 @@ export const BLOCK_TO_FORK: iEVMParamsPerNetwork = { [eEVMNetwork.avalanche]: 11215586, [eEVMNetwork.staging]: undefined, [eEVMNetwork.ganache]: undefined, + [eEVMNetwork.mumbai]: 25291667, }; export const buildForkConfig = ( diff --git a/helpers/constants/tokens.ts b/helpers/constants/tokens.ts index 41ad66d15..eb482de9b 100644 --- a/helpers/constants/tokens.ts +++ b/helpers/constants/tokens.ts @@ -115,10 +115,10 @@ export const MULTI_CHAIN_VAULT_TOKENS: MULTI_CHAIN_TOKENS_DATA = { hash: generateTokenHashV2([TypedTokens["MKR"]], NETWORKS_CHAIN_ID[eEVMNetwork.ethereum].toString()), }, }, - [eEVMNetwork.matic || - NETWORKS_CHAIN_ID[eEVMNetwork.matic] || - eEVMNetwork.polygon || - NETWORKS_CHAIN_ID[eEVMNetwork.polygon]]: { + [eEVMNetwork.polygon || + NETWORKS_CHAIN_ID[eEVMNetwork.polygon] || + eEVMNetwork.matic || + NETWORKS_CHAIN_ID[eEVMNetwork.matic]]: { USDC: { address: PolygonLegos.tokens.USDC, pair: false, diff --git a/optyfi-sdk/config.ts b/optyfi-sdk/config.ts index 68d46c25f..9f553d9e1 100644 --- a/optyfi-sdk/config.ts +++ b/optyfi-sdk/config.ts @@ -1,13 +1,24 @@ import { defineConfig } from "./src"; -import { PROTOCOLS } from "../helpers/constants/adapters"; +import { PROTOCOLS as ETH_PROTOCOLS } from "../helpers/constants/adapters"; +import { PROTOCOLS as POLYGON_PROTOCOLS } from "../helpers/constants/adapters-polygon"; import { NETWORKS_ID } from "../helpers/constants/network"; +import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; + export default defineConfig({ - [NETWORKS_ID.MAINNET]: { + // TODO: ONLY WORKS FOR ONE NETWORK + // [NETWORKS_ID.MAINNET]: { + // strategies: { + // dai: "0x6B175474E89094C44Da98b954EedeAC495271d0F", + // usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + // slp: "0x397FF1542f962076d0BFE58eA045FfA2d347ACa0", + // }, + // protocols: ETH_PROTOCOLS, + // }, + [NETWORKS_ID.POLYGON]: { strategies: { - dai: "0x6B175474E89094C44Da98b954EedeAC495271d0F", - usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - slp: "0x397FF1542f962076d0BFE58eA045FfA2d347ACa0", + usdc: PolygonLegos.tokens.USDC, + wmatic: PolygonLegos.tokens.WMATIC, }, - protocols: PROTOCOLS, + protocols: POLYGON_PROTOCOLS, }, }); diff --git a/scripts/optyfi-sdk.ts b/scripts/optyfi-sdk.ts index 5e30e32f5..8b668180a 100644 --- a/scripts/optyfi-sdk.ts +++ b/scripts/optyfi-sdk.ts @@ -1,7 +1,7 @@ import data from "../optyfi-sdk/config"; import { NETWORKS, NETWORKS_ID } from "../helpers/constants/network"; import { createDir, createFile, getMoralisConfig } from "../helpers/utils"; -import { DEFI_POOL_DATA, STRATEGIES, STRATEGY_DATA } from "../helpers/type"; +import { DEFI_POOLS, STRATEGIES, STRATEGY_DATA } from "../helpers/type"; import { ETH } from "../helpers/constants/utils"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; @@ -38,7 +38,7 @@ async function main() { }), ); const data = response.data.result; - const defiPools: DEFI_POOL_DATA = {}; + const defiPools: DEFI_POOLS = {}; for (let i = 0; i < data.adapterPools.length; i++) { const pool = data.adapterPools[i]; defiPools[pool.poolName] = { From 664b1c18015db72e287c93ef722817dbbfcd247d Mon Sep 17 00:00:00 2001 From: leodinh Date: Sun, 27 Feb 2022 00:50:03 -0500 Subject: [PATCH 06/52] fix: removed unused import --- deploy_mumbai/004_approve_tokens.ts | 2 +- deploy_polygon/008_deploy_vault_wmatic.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy_mumbai/004_approve_tokens.ts b/deploy_mumbai/004_approve_tokens.ts index 3490e1166..8c0aee580 100644 --- a/deploy_mumbai/004_approve_tokens.ts +++ b/deploy_mumbai/004_approve_tokens.ts @@ -1,6 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { NETWORKS_CHAIN_ID, eEVMNetwork } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; import { TypedMumbaiTokens } from "../helpers/data"; diff --git a/deploy_polygon/008_deploy_vault_wmatic.ts b/deploy_polygon/008_deploy_vault_wmatic.ts index 21af6500b..6e4cfc2ba 100644 --- a/deploy_polygon/008_deploy_vault_wmatic.ts +++ b/deploy_polygon/008_deploy_vault_wmatic.ts @@ -4,7 +4,7 @@ import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-na import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; -import { eEVMNetwork, NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; From 9ec2fe8676b1bfe186ccc3fa7f2422d1cbc359b5 Mon Sep 17 00:00:00 2001 From: leodinh Date: Sun, 27 Feb 2022 15:03:26 -0500 Subject: [PATCH 07/52] fix: changed chainId to chainIdHash --- deploy_mumbai/004_approve_tokens.ts | 4 ++-- deploy_mumbai/007_deploy_vault_usdc.ts | 4 ++-- deploy_mumbai/008_deploy_vault_wmatic.ts | 4 ++-- deploy_polygon/004_approve_tokens.ts | 4 ++-- deploy_polygon/007_deploy_vault_usdc.ts | 4 ++-- deploy_polygon/008_deploy_vault_wmatic.ts | 4 ++-- helper-hardhat-config.ts | 13 +++++++------ 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/deploy_mumbai/004_approve_tokens.ts b/deploy_mumbai/004_approve_tokens.ts index 8c0aee580..bf448e239 100644 --- a/deploy_mumbai/004_approve_tokens.ts +++ b/deploy_mumbai/004_approve_tokens.ts @@ -1,6 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; import { TypedMumbaiTokens } from "../helpers/data"; @@ -25,7 +25,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { registryContract, tokens, true, - NETWORKS_CHAIN_ID.mumbai.toString(), + NETWORKS_CHAIN_ID_HEX.mumbai.toString(), false, ); diff --git a/deploy_mumbai/007_deploy_vault_usdc.ts b/deploy_mumbai/007_deploy_vault_usdc.ts index 13dd0c642..a99acfd99 100644 --- a/deploy_mumbai/007_deploy_vault_usdc.ts +++ b/deploy_mumbai/007_deploy_vault_usdc.ts @@ -3,7 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; import { TypedMumbaiTokens } from "../helpers/data"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { @@ -45,7 +45,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.mumbai.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.mumbai.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_mumbai/008_deploy_vault_wmatic.ts b/deploy_mumbai/008_deploy_vault_wmatic.ts index 83d0ffa1f..b86db9c7f 100644 --- a/deploy_mumbai/008_deploy_vault_wmatic.ts +++ b/deploy_mumbai/008_deploy_vault_wmatic.ts @@ -4,7 +4,7 @@ import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-na import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { TypedMumbaiTokens } from "../helpers/data"; -import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -45,7 +45,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.mumbai.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.mumbai.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_polygon/004_approve_tokens.ts b/deploy_polygon/004_approve_tokens.ts index a249f0e37..ce0bfad43 100644 --- a/deploy_polygon/004_approve_tokens.ts +++ b/deploy_polygon/004_approve_tokens.ts @@ -1,7 +1,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { NETWORKS_CHAIN_ID, eEVMNetwork } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX, eEVMNetwork } from "../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; @@ -27,7 +27,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { registryContract, tokens, true, - NETWORKS_CHAIN_ID.polygon.toString(), + NETWORKS_CHAIN_ID_HEX.polygon.toString(), false, ); diff --git a/deploy_polygon/007_deploy_vault_usdc.ts b/deploy_polygon/007_deploy_vault_usdc.ts index 1dccbc7b3..6bdc24bd0 100644 --- a/deploy_polygon/007_deploy_vault_usdc.ts +++ b/deploy_polygon/007_deploy_vault_usdc.ts @@ -4,7 +4,7 @@ import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-na import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; -import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); @@ -44,7 +44,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.polygon.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/deploy_polygon/008_deploy_vault_wmatic.ts b/deploy_polygon/008_deploy_vault_wmatic.ts index 6e4cfc2ba..446db9bfe 100644 --- a/deploy_polygon/008_deploy_vault_wmatic.ts +++ b/deploy_polygon/008_deploy_vault_wmatic.ts @@ -4,7 +4,7 @@ import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-na import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; -import { NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; @@ -45,7 +45,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ registryAddress, underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID.polygon.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index ebff20af4..bd9d55b8e 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -6,7 +6,7 @@ const GWEI = 1000 * 1000 * 1000; export enum eEVMNetwork { kovan = "kovan", - mainnet = "mainnet", + ethereum = "ethereum", hardhat = "hardhat", staging = "staging", polygon = "polygon", @@ -21,7 +21,7 @@ export type iEVMParamsPerNetwork = { export const NETWORKS_CHAIN_ID: iEVMParamsPerNetwork = { [eEVMNetwork.kovan]: 42, - [eEVMNetwork.mainnet]: 1, + [eEVMNetwork.ethereum]: 1, [eEVMNetwork.hardhat]: 31337, [eEVMNetwork.polygon]: 137, [eEVMNetwork.avalanche]: 43114, @@ -32,17 +32,18 @@ export const NETWORKS_CHAIN_ID: iEVMParamsPerNetwork = { export const NETWORKS_CHAIN_ID_HEX: iEVMParamsPerNetwork = { [eEVMNetwork.kovan]: "0x2a", - [eEVMNetwork.mainnet]: "0x1", + [eEVMNetwork.ethereum]: "0x1", [eEVMNetwork.hardhat]: "0x7a69", [eEVMNetwork.polygon]: "0x89", [eEVMNetwork.avalanche]: "0xa86a", [eEVMNetwork.staging]: "0x539", [eEVMNetwork.ganache]: "0x539", + [eEVMNetwork.mumbai]: "0x13881", }; export const NETWORKS_RPC_URL: iEVMParamsPerNetwork = { [eEVMNetwork.kovan]: process.env.KOVAN_NODE_URL ? process.env.KOVAN_NODE_URL : "", - [eEVMNetwork.mainnet]: process.env.MAINNET_NODE_URL ? process.env.MAINNET_NODE_URL : "", + [eEVMNetwork.ethereum]: process.env.MAINNET_NODE_URL ? process.env.MAINNET_NODE_URL : "", [eEVMNetwork.staging]: process.env.STAGING_NETWORK_URL ? process.env.STAGING_NETWORK_URL : "", [eEVMNetwork.hardhat]: "http://localhost:8545", [eEVMNetwork.polygon]: process.env.POLYGON_NODE_URL ? process.env.POLYGON_NODE_URL : "", @@ -53,7 +54,7 @@ export const NETWORKS_RPC_URL: iEVMParamsPerNetwork = { export const NETWORKS_DEFAULT_GAS: iEVMParamsPerNetwork = { [eEVMNetwork.kovan]: 65 * GWEI, - [eEVMNetwork.mainnet]: 65 * GWEI, + [eEVMNetwork.ethereum]: 65 * GWEI, [eEVMNetwork.hardhat]: "auto", [eEVMNetwork.staging]: "auto", [eEVMNetwork.polygon]: 65 * GWEI, @@ -63,7 +64,7 @@ export const NETWORKS_DEFAULT_GAS: iEVMParamsPerNetwork = { }; export const BLOCK_TO_FORK: iEVMParamsPerNetwork = { - [eEVMNetwork.mainnet]: 14269106, + [eEVMNetwork.ethereum]: 14269106, [eEVMNetwork.kovan]: 29962003, [eEVMNetwork.hardhat]: undefined, [eEVMNetwork.polygon]: 25200204, From ad6219fa52c908cf4083bf5cf68ad4374c673fde Mon Sep 17 00:00:00 2001 From: leodinh Date: Mon, 28 Feb 2022 19:16:53 -0500 Subject: [PATCH 08/52] feat: updated polygon development scripts --- contracts/protocol/aave-polygon-adapter | 2 +- deploy/002_deploy_registryV2.ts | 2 +- .../001_deploy_curvestableswapadapter.ts | 47 +++++++++++++++++ deploy_mumbai/001_deploy_registryV2.ts | 40 --------------- deploy_mumbai/002_deploy_curvegaugeadapter.ts | 43 ++++++++++++++++ .../002_deploy_strategyProviderV2.ts | 30 ----------- .../003_deploy_curvemetapoolfactoryadapter.ts | 46 +++++++++++++++++ deploy_mumbai/003_deploy_riskManagerV2.ts | 50 ------------------- deploy_mumbai/004_approve_tokens.ts | 37 -------------- .../001_deploy_curvestableswapadapter.ts | 45 +++++++++++++++++ deploy_polygon/001_deploy_registryV2.ts | 40 --------------- ...ers.ts => 002_deploy_curvegaugeadapter.ts} | 38 +++++++------- .../002_deploy_strategyProviderV2.ts | 30 ----------- .../003_deploy_curvemetapoolfactoryadapter.ts | 48 ++++++++++++++++++ deploy_polygon/003_deploy_riskManagerV2.ts | 50 ------------------- deploy_polygon/004_approve_tokens.ts | 39 --------------- ...veadapter.ts => 004_deploy_aaveadapter.ts} | 2 +- ...vault_usdc.ts => 005_deploy_vault_usdc.ts} | 2 +- ...t_wmatic.ts => 006_deploy_vault_wmatic.ts} | 2 +- helper-hardhat-config.ts | 2 +- helpers/constants/tokens.ts | 7 ++- 21 files changed, 258 insertions(+), 344 deletions(-) create mode 100644 deploy_mumbai/001_deploy_curvestableswapadapter.ts delete mode 100644 deploy_mumbai/001_deploy_registryV2.ts create mode 100644 deploy_mumbai/002_deploy_curvegaugeadapter.ts delete mode 100644 deploy_mumbai/002_deploy_strategyProviderV2.ts create mode 100644 deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts delete mode 100644 deploy_mumbai/003_deploy_riskManagerV2.ts delete mode 100644 deploy_mumbai/004_approve_tokens.ts create mode 100644 deploy_polygon/001_deploy_curvestableswapadapter.ts delete mode 100644 deploy_polygon/001_deploy_registryV2.ts rename deploy_polygon/{006_deploy_curveadapters.ts => 002_deploy_curvegaugeadapter.ts} (59%) delete mode 100644 deploy_polygon/002_deploy_strategyProviderV2.ts create mode 100644 deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts delete mode 100644 deploy_polygon/003_deploy_riskManagerV2.ts delete mode 100644 deploy_polygon/004_approve_tokens.ts rename deploy_polygon/{005_deploy_aaveadapter.ts => 004_deploy_aaveadapter.ts} (98%) rename deploy_polygon/{007_deploy_vault_usdc.ts => 005_deploy_vault_usdc.ts} (98%) rename deploy_polygon/{008_deploy_vault_wmatic.ts => 006_deploy_vault_wmatic.ts} (98%) diff --git a/contracts/protocol/aave-polygon-adapter b/contracts/protocol/aave-polygon-adapter index ba4ee1951..4a8a0c790 160000 --- a/contracts/protocol/aave-polygon-adapter +++ b/contracts/protocol/aave-polygon-adapter @@ -1 +1 @@ -Subproject commit ba4ee19515f987d5a2fbb953842b6a61899531dc +Subproject commit 4a8a0c7906b19164b38faa01b453bf7ca113c67f diff --git a/deploy/002_deploy_registryV2.ts b/deploy/002_deploy_registryV2.ts index 92c0c7966..70242b07c 100644 --- a/deploy/002_deploy_registryV2.ts +++ b/deploy/002_deploy_registryV2.ts @@ -97,7 +97,7 @@ const func: DeployFunction = async ({ console.log("approve WETH and set hash"); approveTokenAndMapHash.push([ MULTI_CHAIN_VAULT_TOKENS[networkName].WETH.hash, - [MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.address], + [MULTI_CHAIN_VAULT_TOKENS[networkName].WETH.address], ]); } diff --git a/deploy_mumbai/001_deploy_curvestableswapadapter.ts b/deploy_mumbai/001_deploy_curvestableswapadapter.ts new file mode 100644 index 000000000..95e638e6c --- /dev/null +++ b/deploy_mumbai/001_deploy_curvestableswapadapter.ts @@ -0,0 +1,47 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_STABLE_SWAP_ADAPTER } from "../helpers/constants/adapters-polygon"; +import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; +import { TypedMumbaiTokens } from "../helpers/data"; + +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const curveAdapter = ( + await deploy(CURVE_STABLE_SWAP_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_STABLE_SWAP_ADAPTER, + }) + ).address; + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let j = 0; j < tokenKeys.length; j += 1) { + if ( + TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER] && + TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]] + ) { + liquidityPoolsAddressesMapAdapter.push([ + TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); + } + } + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["CurveStableSwapAdapter"]; diff --git a/deploy_mumbai/001_deploy_registryV2.ts b/deploy_mumbai/001_deploy_registryV2.ts deleted file mode 100644 index 9ca2b5c34..000000000 --- a/deploy_mumbai/001_deploy_registryV2.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RegistryProxy } from "../typechain"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = ( - await deploy("RegistryV2", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, - }) - ).address; - const registryProxyAddress = ( - await deploy("RegistryProxy", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, - }) - ).address; - - const registryProxyContract: RegistryProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) - ); - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); - await registryContract.connect(owner).become(registryProxyAddress); -}; - -export default func; -func.tags = ["RegistryV2"]; diff --git a/deploy_mumbai/002_deploy_curvegaugeadapter.ts b/deploy_mumbai/002_deploy_curvegaugeadapter.ts new file mode 100644 index 000000000..1a80400e1 --- /dev/null +++ b/deploy_mumbai/002_deploy_curvegaugeadapter.ts @@ -0,0 +1,43 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_GAUGE_ADAPTER } from "../helpers/constants/adapters-polygon"; +import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; +import { TypedMumbaiTokens } from "../helpers/data"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const curveAdapter = ( + await deploy(CURVE_GAUGE_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_GAUGE_ADAPTER, + }) + ).address; + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let j = 0; j < tokenKeys.length; j += 1) { + if (TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER] && TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]]) { + liquidityPoolsAddressesMapAdapter.push([ + TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); + } + } + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_mumbai/002_deploy_strategyProviderV2.ts b/deploy_mumbai/002_deploy_strategyProviderV2.ts deleted file mode 100644 index a17da1325..000000000 --- a/deploy_mumbai/002_deploy_strategyProviderV2.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2 } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - const strategyProviderAddress = ( - await deploy("StrategyProviderV2", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, - }) - ).address; - - await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); -}; - -export default func; -func.tags = ["StrategyProviderV2", "Polygon"]; diff --git a/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts b/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts new file mode 100644 index 000000000..d254d8f88 --- /dev/null +++ b/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts @@ -0,0 +1,46 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_METAPOOL_FACTORY_ADAPTER } from "../helpers/constants/adapters-polygon"; +import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; +import { TypedMumbaiTokens } from "../helpers/data"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const curveAdapter = ( + await deploy(CURVE_METAPOOL_FACTORY_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_METAPOOL_FACTORY_ADAPTER, + }) + ).address; + + const tokenKeys = Object.keys(TypedMumbaiTokens); + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let j = 0; j < tokenKeys.length; j += 1) { + if ( + TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER] && + TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]] + ) { + liquidityPoolsAddressesMapAdapter.push([ + TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); + } + } + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_mumbai/003_deploy_riskManagerV2.ts b/deploy_mumbai/003_deploy_riskManagerV2.ts deleted file mode 100644 index a1c788548..000000000 --- a/deploy_mumbai/003_deploy_riskManagerV2.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RiskManagerV2, RiskManagerProxy } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - const riskManagerAddress = ( - await deploy("RiskManagerV2", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, - }) - ).address; - - const riskManagerProxyAddress = ( - await deploy("RiskManagerProxy", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, - }) - ).address; - - const riskManagerProxyContract: RiskManagerProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) - ); - - const riskManagerContract: RiskManagerV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) - ); - - await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); - await riskManagerContract.connect(owner).become(riskManagerProxyAddress); - - await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); -}; - -export default func; -func.tags = ["RegistryV2"]; diff --git a/deploy_mumbai/004_approve_tokens.ts b/deploy_mumbai/004_approve_tokens.ts deleted file mode 100644 index bf448e239..000000000 --- a/deploy_mumbai/004_approve_tokens.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; -import { TypedMumbaiTokens } from "../helpers/data"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - - await addRiskProfiles(owner, registryContract); - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const tokens = tokenKeys.length > 0 ? tokenKeys.map(token => TypedMumbaiTokens[token]) : []; - - if (tokens.length > 0) { - console.log("Approving Tokens..."); - - await approveAndMapTokenHashToTokensV2( - owner, - registryContract, - tokens, - true, - NETWORKS_CHAIN_ID_HEX.mumbai.toString(), - false, - ); - - console.log("Approved Tokens..."); - } -}; - -export default func; -func.tags = ["ApproveToken"]; diff --git a/deploy_polygon/001_deploy_curvestableswapadapter.ts b/deploy_polygon/001_deploy_curvestableswapadapter.ts new file mode 100644 index 000000000..dca96253b --- /dev/null +++ b/deploy_polygon/001_deploy_curvestableswapadapter.ts @@ -0,0 +1,45 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_STABLE_SWAP_ADAPTER } from "../helpers/constants/adapters-polygon"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const curveAdapter = ( + await deploy(CURVE_STABLE_SWAP_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_STABLE_SWAP_ADAPTER, + }) + ).address; + + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + : []; + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let j = 0; j < tokenKeys.length; j += 1) { + if (PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER] && PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]]) { + liquidityPoolsAddressesMapAdapter.push([ + PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); + } + } + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["CurveStableSwapAdapter"]; diff --git a/deploy_polygon/001_deploy_registryV2.ts b/deploy_polygon/001_deploy_registryV2.ts deleted file mode 100644 index 9ca2b5c34..000000000 --- a/deploy_polygon/001_deploy_registryV2.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RegistryProxy } from "../typechain"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = ( - await deploy("RegistryV2", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, - }) - ).address; - const registryProxyAddress = ( - await deploy("RegistryProxy", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_PROXY, - }) - ).address; - - const registryProxyContract: RegistryProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registryProxyAddress) - ); - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); - await registryContract.connect(owner).become(registryProxyAddress); -}; - -export default func; -func.tags = ["RegistryV2"]; diff --git a/deploy_polygon/006_deploy_curveadapters.ts b/deploy_polygon/002_deploy_curvegaugeadapter.ts similarity index 59% rename from deploy_polygon/006_deploy_curveadapters.ts rename to deploy_polygon/002_deploy_curvegaugeadapter.ts index b0ee96183..9f9811759 100644 --- a/deploy_polygon/006_deploy_curveadapters.ts +++ b/deploy_polygon/002_deploy_curvegaugeadapter.ts @@ -1,6 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_ADAPTERS, CURVE_PROTOCOLS } from "../helpers/constants/adapters-polygon"; +import { CURVE_GAUGE_ADAPTER } from "../helpers/constants/adapters-polygon"; import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; @@ -12,17 +12,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const curveAdapters: { [name: string]: string } = {}; - for (let i = 0; i < CURVE_ADAPTERS.length; i++) { - curveAdapters[CURVE_ADAPTERS[i]] = ( - await deploy(CURVE_ADAPTERS[i], { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_ADAPTERS[i], - }) - ).address; - } + const curveAdapter = ( + await deploy(CURVE_GAUGE_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_GAUGE_ADAPTER, + }) + ).address; const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) @@ -30,20 +27,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const liquidityPoolsAddressesMapAdapter: string[][] = []; - for (let i = 0; i < CURVE_ADAPTERS.length; i += 1) { - for (let j = 0; j < tokenKeys.length; j += 1) { - if (PolygonDefiPools[CURVE_ADAPTERS[i]] && PolygonDefiPools[CURVE_ADAPTERS[i]][tokenKeys[j]]) { - liquidityPoolsAddressesMapAdapter.push([ - PolygonDefiPools[CURVE_ADAPTERS[i]][tokenKeys[j]].lpToken, - curveAdapters[CURVE_ADAPTERS[i]], - ]); - } + for (let j = 0; j < tokenKeys.length; j += 1) { + if (PolygonDefiPools[CURVE_GAUGE_ADAPTER] && PolygonDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]]) { + liquidityPoolsAddressesMapAdapter.push([ + PolygonDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); } } + if (liquidityPoolsAddressesMapAdapter.length > 0) { await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); } }; export default func; -func.tags = ["Setup"]; +func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_polygon/002_deploy_strategyProviderV2.ts b/deploy_polygon/002_deploy_strategyProviderV2.ts deleted file mode 100644 index a17da1325..000000000 --- a/deploy_polygon/002_deploy_strategyProviderV2.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2 } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - const strategyProviderAddress = ( - await deploy("StrategyProviderV2", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, - }) - ).address; - - await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); -}; - -export default func; -func.tags = ["StrategyProviderV2", "Polygon"]; diff --git a/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts b/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts new file mode 100644 index 000000000..9dde0dade --- /dev/null +++ b/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts @@ -0,0 +1,48 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CURVE_METAPOOL_FACTORY_ADAPTER } from "../helpers/constants/adapters-polygon"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; +import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments } = hre; + const [owner] = await hre.ethers.getSigners(); + const { deploy } = deployments; + const registryAddress = (await deployments.get("RegistryProxy")).address; + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const curveAdapter = ( + await deploy(CURVE_METAPOOL_FACTORY_ADAPTER, { + from: await owner.getAddress(), + args: [registryAddress], + log: true, + contract: CURVE_METAPOOL_FACTORY_ADAPTER, + }) + ).address; + + const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] + ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) + : []; + + const liquidityPoolsAddressesMapAdapter: string[][] = []; + + for (let j = 0; j < tokenKeys.length; j += 1) { + if ( + PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER] && + PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]] + ) { + liquidityPoolsAddressesMapAdapter.push([ + PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]].lpToken, + curveAdapter, + ]); + } + } + + if (liquidityPoolsAddressesMapAdapter.length > 0) { + await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); + } +}; + +export default func; +func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_polygon/003_deploy_riskManagerV2.ts b/deploy_polygon/003_deploy_riskManagerV2.ts deleted file mode 100644 index a1c788548..000000000 --- a/deploy_polygon/003_deploy_riskManagerV2.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RiskManagerV2, RiskManagerProxy } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - - const registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - const riskManagerAddress = ( - await deploy("RiskManagerV2", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, - }) - ).address; - - const riskManagerProxyAddress = ( - await deploy("RiskManagerProxy", { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, - }) - ).address; - - const riskManagerProxyContract: RiskManagerProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, riskManagerProxyAddress) - ); - - const riskManagerContract: RiskManagerV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) - ); - - await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); - await riskManagerContract.connect(owner).become(riskManagerProxyAddress); - - await executeFunc(registryContract, owner, "setRiskManager(address)", [riskManagerContract.address]); -}; - -export default func; -func.tags = ["RegistryV2"]; diff --git a/deploy_polygon/004_approve_tokens.ts b/deploy_polygon/004_approve_tokens.ts deleted file mode 100644 index ce0bfad43..000000000 --- a/deploy_polygon/004_approve_tokens.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { NETWORKS_CHAIN_ID_HEX, eEVMNetwork } from "../helper-hardhat-config"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { addRiskProfiles, approveAndMapTokenHashToTokensV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - - await addRiskProfiles(owner, registryContract); - - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon]) - : []; - const tokens = - tokenKeys.length > 0 ? tokenKeys.map(token => MULTI_CHAIN_VAULT_TOKENS[eEVMNetwork.polygon][token].address) : []; - if (tokens.length > 0) { - console.log("Approving Tokens..."); - - await approveAndMapTokenHashToTokensV2( - owner, - registryContract, - tokens, - true, - NETWORKS_CHAIN_ID_HEX.polygon.toString(), - false, - ); - - console.log("Approved Tokens..."); - } -}; - -export default func; -func.tags = ["ApproveToken"]; diff --git a/deploy_polygon/005_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts similarity index 98% rename from deploy_polygon/005_deploy_aaveadapter.ts rename to deploy_polygon/004_deploy_aaveadapter.ts index a8fc8bde9..c4010665c 100644 --- a/deploy_polygon/005_deploy_aaveadapter.ts +++ b/deploy_polygon/004_deploy_aaveadapter.ts @@ -39,4 +39,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["Setup"]; +func.tags = ["AaveAdapter"]; diff --git a/deploy_polygon/007_deploy_vault_usdc.ts b/deploy_polygon/005_deploy_vault_usdc.ts similarity index 98% rename from deploy_polygon/007_deploy_vault_usdc.ts rename to deploy_polygon/005_deploy_vault_usdc.ts index 6bdc24bd0..8eeeb8d37 100644 --- a/deploy_polygon/007_deploy_vault_usdc.ts +++ b/deploy_polygon/005_deploy_vault_usdc.ts @@ -9,7 +9,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; - const riskProfileCode = 2; + const riskProfileCode = 1; const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = PolygonLegos.tokens.USDC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); diff --git a/deploy_polygon/008_deploy_vault_wmatic.ts b/deploy_polygon/006_deploy_vault_wmatic.ts similarity index 98% rename from deploy_polygon/008_deploy_vault_wmatic.ts rename to deploy_polygon/006_deploy_vault_wmatic.ts index 446db9bfe..0e5b1d1c2 100644 --- a/deploy_polygon/008_deploy_vault_wmatic.ts +++ b/deploy_polygon/006_deploy_vault_wmatic.ts @@ -10,7 +10,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; - const riskProfileCode = 2; + const riskProfileCode = 1; const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = PolygonLegos.tokens.WMATIC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index 703d8ee7d..cf31702ba 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -93,7 +93,7 @@ export const buildForkConfig = ( export const buildDeployConfig = (fork: eEVMNetwork): string[] | undefined => { if (fork) { - const deployFolders: string[] = [`deploy`, `deploy_${eEVMNetwork}`]; + const deployFolders: string[] = [`deploy`, `deploy_${fork}`]; return deployFolders; } }; diff --git a/helpers/constants/tokens.ts b/helpers/constants/tokens.ts index 22c67e4fe..79698534b 100644 --- a/helpers/constants/tokens.ts +++ b/helpers/constants/tokens.ts @@ -126,7 +126,12 @@ export const MULTI_CHAIN_VAULT_TOKENS: MULTI_CHAIN_TOKENS_DATA = { pair: false, hash: generateTokenHashV2([PolygonLegos.tokens.DAI], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), }, - ["WMATIC" || "WETH"]: { + WMATIC: { + address: PolygonLegos.tokens.WMATIC, + pair: false, + hash: generateTokenHashV2([PolygonLegos.tokens.WMATIC], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), + }, + WETH: { address: PolygonLegos.tokens.WMATIC, pair: false, hash: generateTokenHashV2([PolygonLegos.tokens.WMATIC], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), From 7d2d588775d24df7ddcb41659e655c54ee16b25a Mon Sep 17 00:00:00 2001 From: leodinh Date: Sat, 12 Mar 2022 00:10:56 -0500 Subject: [PATCH 09/52] refactor: fixed key object issue for tokens --- helpers/constants/tokens.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/constants/tokens.ts b/helpers/constants/tokens.ts index da66d4456..a716b186e 100644 --- a/helpers/constants/tokens.ts +++ b/helpers/constants/tokens.ts @@ -126,7 +126,12 @@ const polygonTokens = { pair: false, hash: generateTokenHashV2([PolygonLegos.tokens.DAI], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), }, - ["WMATIC" || "WETH"]: { + WMATIC: { + address: PolygonLegos.tokens.WMATIC, + pair: false, + hash: generateTokenHashV2([PolygonLegos.tokens.WMATIC], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), + }, + WETH: { address: PolygonLegos.tokens.WMATIC, pair: false, hash: generateTokenHashV2([PolygonLegos.tokens.WMATIC], NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]), From 35251830fd87c9e23227bdbd29793c564d600b06 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 17 Mar 2022 13:56:54 -0400 Subject: [PATCH 10/52] refactor(deploy): clean kovan deployments --- deploy_kovan/001_upgrade_registryV2.ts | 35 ------------- deploy_kovan/002_reset_strategy.ts | 27 ---------- deploy_kovan/003_rebalance.ts | 15 ------ deploy_kovan/004_deploy_strategyProviderV2.ts | 30 ------------ deploy_kovan/005_upgrade_riskManagerV2.ts | 33 ------------- deploy_kovan/006_deploy_vaultV2_usdc.ts | 49 ------------------- deploy_kovan/008_set_strategy.ts | 40 --------------- deploy_kovan/009_rebalance.ts | 15 ------ 8 files changed, 244 deletions(-) delete mode 100644 deploy_kovan/001_upgrade_registryV2.ts delete mode 100644 deploy_kovan/002_reset_strategy.ts delete mode 100644 deploy_kovan/003_rebalance.ts delete mode 100644 deploy_kovan/004_deploy_strategyProviderV2.ts delete mode 100644 deploy_kovan/005_upgrade_riskManagerV2.ts delete mode 100644 deploy_kovan/006_deploy_vaultV2_usdc.ts delete mode 100644 deploy_kovan/008_set_strategy.ts delete mode 100644 deploy_kovan/009_rebalance.ts diff --git a/deploy_kovan/001_upgrade_registryV2.ts b/deploy_kovan/001_upgrade_registryV2.ts deleted file mode 100644 index 89c88e16b..000000000 --- a/deploy_kovan/001_upgrade_registryV2.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RegistryProxy } from "../typechain"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = ( - await deploy("RegistryV2", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, - }) - ).address; - - const registryProxyContract: RegistryProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, KOVAN.RegistryProxy) - ); - - let registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); - await registryContract.connect(owner).become(KOVAN.RegistryProxy); - - registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy); - await registryContract.resetV1Contracts(); -}; - -export default func; -func.tags = ["RegistryV2_Kovan"]; diff --git a/deploy_kovan/002_reset_strategy.ts b/deploy_kovan/002_reset_strategy.ts deleted file mode 100644 index 42a3fddce..000000000 --- a/deploy_kovan/002_reset_strategy.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import KOVAN from "../_deployments/kovan.json"; -import { StrategyProvider } from "../typechain"; -import { generateTokenHash } from "../helpers/helpers"; -import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const strategyProviderContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, KOVAN.StrategyProvider) - ); - - await strategyProviderContract.setBestDefaultStrategy( - 2, - generateTokenHash([AAVE_TOKENS.USDC]), - hre.ethers.constants.HashZero, - ); - - await strategyProviderContract.setBestStrategy( - 2, - generateTokenHash([AAVE_TOKENS.USDC]), - hre.ethers.constants.HashZero, - ); -}; - -export default func; -func.tags = ["Reset_Strategy"]; diff --git a/deploy_kovan/003_rebalance.ts b/deploy_kovan/003_rebalance.ts deleted file mode 100644 index 15194e8eb..000000000 --- a/deploy_kovan/003_rebalance.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const [owner] = await hre.ethers.getSigners(); - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "rebalance()", []); -}; - -export default func; -func.tags = ["Rebalance"]; diff --git a/deploy_kovan/004_deploy_strategyProviderV2.ts b/deploy_kovan/004_deploy_strategyProviderV2.ts deleted file mode 100644 index a31d4ff28..000000000 --- a/deploy_kovan/004_deploy_strategyProviderV2.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import KOVAN from "../_deployments/kovan.json"; -import { RegistryV2 } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - - const strategyProviderAddress = ( - await deploy("StrategyProviderV2", { - from: await owner.getAddress(), - args: [KOVAN.RegistryProxy], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, - }) - ).address; - - const registryContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy) - ); - - await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); -}; - -export default func; -func.tags = ["StrategyProviderV2"]; diff --git a/deploy_kovan/005_upgrade_riskManagerV2.ts b/deploy_kovan/005_upgrade_riskManagerV2.ts deleted file mode 100644 index b885025e5..000000000 --- a/deploy_kovan/005_upgrade_riskManagerV2.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RiskManagerV2, RiskManagerProxy } from "../typechain"; -import KOVAN from "../_deployments/kovan.json"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskManagerAddress = ( - await deploy("RiskManagerV2", { - from: await owner.getAddress(), - args: [KOVAN.RegistryProxy], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, - }) - ).address; - - const riskManagerProxyContract: RiskManagerProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, KOVAN.RiskManagerProxy) - ); - - const riskManagerContract: RiskManagerV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) - ); - - await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); - await riskManagerContract.connect(owner).become(KOVAN.RiskManagerProxy); -}; - -export default func; -func.tags = ["RiskManagerV2"]; diff --git a/deploy_kovan/006_deploy_vaultV2_usdc.ts b/deploy_kovan/006_deploy_vaultV2_usdc.ts deleted file mode 100644 index b1865898a..000000000 --- a/deploy_kovan/006_deploy_vaultV2_usdc.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import KOVAN from "../_deployments/kovan.json"; -import { expect } from "chai"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 2; - const oldVault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy); - const underlyingToken = await oldVault.underlyingToken(); - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("VaultV2", { - from: await owner.getAddress(), - args: [ - KOVAN.RegistryProxy, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, - }) - ).address; - - const vaultProxy = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_PROXY, KOVAN.opAVUSDCint.VaultProxy); - - expect(vaultProxy.ADMIN()).to.be.equals(await admin.getAddress()); - await executeFunc(vaultProxy, admin, "upgradeTo(address)", [vaultAddress]); - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ - KOVAN.RegistryProxy, - underlyingToken, - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["VaultV2"]; diff --git a/deploy_kovan/008_set_strategy.ts b/deploy_kovan/008_set_strategy.ts deleted file mode 100644 index 896597ff5..000000000 --- a/deploy_kovan/008_set_strategy.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { StrategyProviderV2 } from "../typechain"; -import { generateTokenHashV2 } from "../helpers/helpers"; -import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - - const strategyProviderContract = ( - await hre.ethers.getContractAt( - ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, - ( - await deployments.get("StrategyProviderV2") - ).address, - ) - ); - - const AAVE_V2_STRATEGY = [ - { - pool: "0x1E40B561EC587036f9789aF83236f057D1ed2A90", - outputToken: "0xe12AFeC5aa12Cf614678f9bFeeB98cA9Bb95b5B0", - isBorrow: true, - }, - ]; - await strategyProviderContract.setBestDefaultStrategy( - 2, - generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), - AAVE_V2_STRATEGY, - ); - - await strategyProviderContract.setBestStrategy( - 2, - generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), - AAVE_V2_STRATEGY, - ); -}; - -export default func; -func.tags = ["Set_Strategy"]; diff --git a/deploy_kovan/009_rebalance.ts b/deploy_kovan/009_rebalance.ts deleted file mode 100644 index 90be0db91..000000000 --- a/deploy_kovan/009_rebalance.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const [owner] = await hre.ethers.getSigners(); - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "rebalance()", []); -}; - -export default func; -func.tags = ["Rebalance"]; From dca932b4cf06a86ae7927165ed855ec34f3f86e8 Mon Sep 17 00:00:00 2001 From: leodinh Date: Thu, 17 Mar 2022 17:12:22 -0400 Subject: [PATCH 11/52] refactor: refactored deployment scripts and added config vault scripts --- deploy/002_deploy_registry.ts | 23 ++++ deploy_kovan/001_upgrade_registryV2.ts | 35 ------ deploy_kovan/002_reset_strategy.ts | 27 ---- deploy_kovan/003_rebalance.ts | 15 --- deploy_kovan/004_deploy_strategyProviderV2.ts | 30 ----- deploy_kovan/005_upgrade_riskManagerV2.ts | 33 ----- deploy_kovan/006_deploy_vaultV2_usdc.ts | 49 -------- deploy_kovan/008_set_strategy.ts | 40 ------ deploy_kovan/009_rebalance.ts | 15 --- .../001_deploy_curvestableswapadapter.ts | 2 +- .../002_deploy_curvegaugeadapter.ts | 2 +- .../003_deploy_curvemetapoolfactoryadapter.ts | 2 +- deploy_polygon/004_deploy_aaveadapter.ts | 2 +- ...vault_usdc.ts => 005_deploy_opUSDCgrow.ts} | 13 +- deploy_polygon/006_config_opUSDCgrow.ts | 118 ++++++++++++++++++ ...lt_wmatic.ts => 007_deploy_opMATICgrow.ts} | 13 +- deploy_polygon/008_config_opWETHgrow.ts | 116 +++++++++++++++++ helpers/constants/contracts-data.ts | 4 +- helpers/type.d.ts | 2 +- 19 files changed, 276 insertions(+), 265 deletions(-) delete mode 100644 deploy_kovan/001_upgrade_registryV2.ts delete mode 100644 deploy_kovan/002_reset_strategy.ts delete mode 100644 deploy_kovan/003_rebalance.ts delete mode 100644 deploy_kovan/004_deploy_strategyProviderV2.ts delete mode 100644 deploy_kovan/005_upgrade_riskManagerV2.ts delete mode 100644 deploy_kovan/006_deploy_vaultV2_usdc.ts delete mode 100644 deploy_kovan/008_set_strategy.ts delete mode 100644 deploy_kovan/009_rebalance.ts rename deploy_polygon/{005_deploy_vault_usdc.ts => 005_deploy_opUSDCgrow.ts} (85%) create mode 100644 deploy_polygon/006_config_opUSDCgrow.ts rename deploy_polygon/{006_deploy_vault_wmatic.ts => 007_deploy_opMATICgrow.ts} (85%) create mode 100644 deploy_polygon/008_config_opWETHgrow.ts diff --git a/deploy/002_deploy_registry.ts b/deploy/002_deploy_registry.ts index 4d58df5d4..10e304f09 100644 --- a/deploy/002_deploy_registry.ts +++ b/deploy/002_deploy_registry.ts @@ -126,6 +126,29 @@ const func: DeployFunction = async ({ ]); } } + + if (chainId == "137") { + const wmaticApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address); + + if (wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { + console.log("only set WMATIC hash"); + console.log("\n"); + onlySetTokensHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], + ]); + } + + if (!wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { + console.log("approve WMATIC and set hash"); + console.log("\n"); + approveTokenAndMapHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], + ]); + } + } + if (approveTokenAndMapHash.length > 0) { console.log("approve token and map hash"); console.log("\n"); diff --git a/deploy_kovan/001_upgrade_registryV2.ts b/deploy_kovan/001_upgrade_registryV2.ts deleted file mode 100644 index 89c88e16b..000000000 --- a/deploy_kovan/001_upgrade_registryV2.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RegistryV2, RegistryProxy } from "../typechain"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = ( - await deploy("RegistryV2", { - from: await owner.getAddress(), - args: [], - log: true, - contract: ESSENTIAL_CONTRACTS.REGISTRY_V2, - }) - ).address; - - const registryProxyContract: RegistryProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, KOVAN.RegistryProxy) - ); - - let registryContract: RegistryV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress) - ); - - await registryProxyContract.connect(owner).setPendingImplementation(registryAddress); - await registryContract.connect(owner).become(KOVAN.RegistryProxy); - - registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy); - await registryContract.resetV1Contracts(); -}; - -export default func; -func.tags = ["RegistryV2_Kovan"]; diff --git a/deploy_kovan/002_reset_strategy.ts b/deploy_kovan/002_reset_strategy.ts deleted file mode 100644 index 42a3fddce..000000000 --- a/deploy_kovan/002_reset_strategy.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import KOVAN from "../_deployments/kovan.json"; -import { StrategyProvider } from "../typechain"; -import { generateTokenHash } from "../helpers/helpers"; -import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const strategyProviderContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, KOVAN.StrategyProvider) - ); - - await strategyProviderContract.setBestDefaultStrategy( - 2, - generateTokenHash([AAVE_TOKENS.USDC]), - hre.ethers.constants.HashZero, - ); - - await strategyProviderContract.setBestStrategy( - 2, - generateTokenHash([AAVE_TOKENS.USDC]), - hre.ethers.constants.HashZero, - ); -}; - -export default func; -func.tags = ["Reset_Strategy"]; diff --git a/deploy_kovan/003_rebalance.ts b/deploy_kovan/003_rebalance.ts deleted file mode 100644 index 15194e8eb..000000000 --- a/deploy_kovan/003_rebalance.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const [owner] = await hre.ethers.getSigners(); - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "rebalance()", []); -}; - -export default func; -func.tags = ["Rebalance"]; diff --git a/deploy_kovan/004_deploy_strategyProviderV2.ts b/deploy_kovan/004_deploy_strategyProviderV2.ts deleted file mode 100644 index a31d4ff28..000000000 --- a/deploy_kovan/004_deploy_strategyProviderV2.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import KOVAN from "../_deployments/kovan.json"; -import { RegistryV2 } from "../typechain"; -import { executeFunc } from "../helpers/helpers"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - - const strategyProviderAddress = ( - await deploy("StrategyProviderV2", { - from: await owner.getAddress(), - args: [KOVAN.RegistryProxy], - log: true, - contract: ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER_V2, - }) - ).address; - - const registryContract = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, KOVAN.RegistryProxy) - ); - - await executeFunc(registryContract, owner, "setStrategyProvider(address)", [strategyProviderAddress]); -}; - -export default func; -func.tags = ["StrategyProviderV2"]; diff --git a/deploy_kovan/005_upgrade_riskManagerV2.ts b/deploy_kovan/005_upgrade_riskManagerV2.ts deleted file mode 100644 index b885025e5..000000000 --- a/deploy_kovan/005_upgrade_riskManagerV2.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { RiskManagerV2, RiskManagerProxy } from "../typechain"; -import KOVAN from "../_deployments/kovan.json"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskManagerAddress = ( - await deploy("RiskManagerV2", { - from: await owner.getAddress(), - args: [KOVAN.RegistryProxy], - log: true, - contract: ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, - }) - ).address; - - const riskManagerProxyContract: RiskManagerProxy = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_PROXY, KOVAN.RiskManagerProxy) - ); - - const riskManagerContract: RiskManagerV2 = ( - await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER_V2, riskManagerAddress) - ); - - await riskManagerProxyContract.connect(owner).setPendingImplementation(riskManagerAddress); - await riskManagerContract.connect(owner).become(KOVAN.RiskManagerProxy); -}; - -export default func; -func.tags = ["RiskManagerV2"]; diff --git a/deploy_kovan/006_deploy_vaultV2_usdc.ts b/deploy_kovan/006_deploy_vaultV2_usdc.ts deleted file mode 100644 index b1865898a..000000000 --- a/deploy_kovan/006_deploy_vaultV2_usdc.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import KOVAN from "../_deployments/kovan.json"; -import { expect } from "chai"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 2; - const oldVault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, KOVAN.opAVUSDCint.VaultProxy); - const underlyingToken = await oldVault.underlyingToken(); - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("VaultV2", { - from: await owner.getAddress(), - args: [ - KOVAN.RegistryProxy, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, - }) - ).address; - - const vaultProxy = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_PROXY, KOVAN.opAVUSDCint.VaultProxy); - - expect(vaultProxy.ADMIN()).to.be.equals(await admin.getAddress()); - await executeFunc(vaultProxy, admin, "upgradeTo(address)", [vaultAddress]); - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "initialize(address,address,string,string,uint256)", [ - KOVAN.RegistryProxy, - underlyingToken, - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["VaultV2"]; diff --git a/deploy_kovan/008_set_strategy.ts b/deploy_kovan/008_set_strategy.ts deleted file mode 100644 index 896597ff5..000000000 --- a/deploy_kovan/008_set_strategy.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { StrategyProviderV2 } from "../typechain"; -import { generateTokenHashV2 } from "../helpers/helpers"; -import AAVE_TOKENS from "../helpers/data/kovan_aave_tokens.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - - const strategyProviderContract = ( - await hre.ethers.getContractAt( - ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, - ( - await deployments.get("StrategyProviderV2") - ).address, - ) - ); - - const AAVE_V2_STRATEGY = [ - { - pool: "0x1E40B561EC587036f9789aF83236f057D1ed2A90", - outputToken: "0xe12AFeC5aa12Cf614678f9bFeeB98cA9Bb95b5B0", - isBorrow: true, - }, - ]; - await strategyProviderContract.setBestDefaultStrategy( - 2, - generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), - AAVE_V2_STRATEGY, - ); - - await strategyProviderContract.setBestStrategy( - 2, - generateTokenHashV2([AAVE_TOKENS.USDC], (await hre.getChainId()).toString()), - AAVE_V2_STRATEGY, - ); -}; - -export default func; -func.tags = ["Set_Strategy"]; diff --git a/deploy_kovan/009_rebalance.ts b/deploy_kovan/009_rebalance.ts deleted file mode 100644 index 90be0db91..000000000 --- a/deploy_kovan/009_rebalance.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc } from "../helpers/helpers"; -import KOVAN from "../_deployments/kovan.json"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const [owner] = await hre.ethers.getSigners(); - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, KOVAN.opAVUSDCint.VaultProxy, owner); - - await executeFunc(vault, owner, "rebalance()", []); -}; - -export default func; -func.tags = ["Rebalance"]; diff --git a/deploy_polygon/001_deploy_curvestableswapadapter.ts b/deploy_polygon/001_deploy_curvestableswapadapter.ts index dca96253b..32318679d 100644 --- a/deploy_polygon/001_deploy_curvestableswapadapter.ts +++ b/deploy_polygon/001_deploy_curvestableswapadapter.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); const curveAdapter = ( await deploy(CURVE_STABLE_SWAP_ADAPTER, { from: await owner.getAddress(), diff --git a/deploy_polygon/002_deploy_curvegaugeadapter.ts b/deploy_polygon/002_deploy_curvegaugeadapter.ts index 9f9811759..d2c153842 100644 --- a/deploy_polygon/002_deploy_curvegaugeadapter.ts +++ b/deploy_polygon/002_deploy_curvegaugeadapter.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); const curveAdapter = ( await deploy(CURVE_GAUGE_ADAPTER, { from: await owner.getAddress(), diff --git a/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts b/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts index 9dde0dade..1994174bc 100644 --- a/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts +++ b/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); const curveAdapter = ( await deploy(CURVE_METAPOOL_FACTORY_ADAPTER, { from: await owner.getAddress(), diff --git a/deploy_polygon/004_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts index c4010665c..f557170e7 100644 --- a/deploy_polygon/004_deploy_aaveadapter.ts +++ b/deploy_polygon/004_deploy_aaveadapter.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const [owner] = await hre.ethers.getSigners(); const { deploy } = deployments; const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); + const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); const adapter = ( await deploy(AAVE_ADAPTER_NAME, { from: await owner.getAddress(), diff --git a/deploy_polygon/005_deploy_vault_usdc.ts b/deploy_polygon/005_deploy_opUSDCgrow.ts similarity index 85% rename from deploy_polygon/005_deploy_vault_usdc.ts rename to deploy_polygon/005_deploy_opUSDCgrow.ts index 8eeeb8d37..b89a1142a 100644 --- a/deploy_polygon/005_deploy_vault_usdc.ts +++ b/deploy_polygon/005_deploy_opUSDCgrow.ts @@ -16,7 +16,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); const vaultAddress = ( - await deploy("VaultUSDCV2", { + await deploy("opUSDCgrow", { from: await owner.getAddress(), args: [ registryAddress, @@ -26,12 +26,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { RISK_PROFILES[riskProfileCode].symbol, ], log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, + contract: ESSENTIAL_CONTRACTS.VAULT, }) ).address; const vaultProxyAddress = ( - await deploy("VaultUSDCProxyV2", { + await deploy("opUSDCgrowProxy", { from: await owner.getAddress(), args: [vaultAddress, await admin.getAddress(), "0x"], log: true, @@ -39,11 +39,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }) ).address; - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ registryAddress, - underlyingToken, generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, @@ -52,4 +51,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["VaultUSDCV2"]; +func.tags = ["opUSDCgrow"]; diff --git a/deploy_polygon/006_config_opUSDCgrow.ts b/deploy_polygon/006_config_opUSDCgrow.ts new file mode 100644 index 000000000..2ad452644 --- /dev/null +++ b/deploy_polygon/006_config_opUSDCgrow.ts @@ -0,0 +1,118 @@ +import { BigNumber } from "ethers"; +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const registryProxyAddress = (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opUSDCgrowProxyAddress = (await deployments.get("opUSDCgrowProxy")).address; + + const opUSDCgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opUSDCgrowProxyAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opUSDCgrow"); + console.log("\n"); + const expectedRiskProfileCode = BigNumber.from("1"); + const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opUSDCgrow.."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + } + + console.log("vaultConfiguration for opUSDCgrow"); + console.log("\n"); + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + await opUSDCgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opUSDCgrow config..."); + console.log("\n"); + + const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC + const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 + + console.log("opUSDCgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); + console.log("\n"); + await opUSDCgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + } + + console.log("unpause opUSDCgrow"); + console.log("\n"); + const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opUSDCgrow vault..."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); + } else { + console.log("opUSDCgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opUSDCgrow"); + console.log("\n"); + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const actualAccountsRoot = await opUSDCgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opUSDCgrow vault..."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + } else { + console.log("whitelisted accounts root for opUSDCgrow is as expected"); + console.log("\n"); + } +}; +export default func; +func.tags = ["ConfigopUSDCgrow"]; +func.dependencies = ["StrategyProvider"]; diff --git a/deploy_polygon/006_deploy_vault_wmatic.ts b/deploy_polygon/007_deploy_opMATICgrow.ts similarity index 85% rename from deploy_polygon/006_deploy_vault_wmatic.ts rename to deploy_polygon/007_deploy_opMATICgrow.ts index 0e5b1d1c2..57b257af0 100644 --- a/deploy_polygon/006_deploy_vault_wmatic.ts +++ b/deploy_polygon/007_deploy_opMATICgrow.ts @@ -17,7 +17,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); const vaultAddress = ( - await deploy("VaultWMATICV2", { + await deploy("opWMATICgrow", { from: await owner.getAddress(), args: [ registryAddress, @@ -27,12 +27,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { RISK_PROFILES[riskProfileCode].symbol, ], log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, + contract: ESSENTIAL_CONTRACTS.VAULT, }) ).address; const vaultProxyAddress = ( - await deploy("VaultWMATICProxyV2", { + await deploy("opWMATICgrowProxy", { from: await owner.getAddress(), args: [vaultAddress, await admin.getAddress(), "0x"], log: true, @@ -40,11 +40,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }) ).address; - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ registryAddress, - underlyingToken, generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, @@ -53,4 +52,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["VaultWMATICV2"]; +func.tags = ["opWMATICgrow"]; diff --git a/deploy_polygon/008_config_opWETHgrow.ts b/deploy_polygon/008_config_opWETHgrow.ts new file mode 100644 index 000000000..828b64cd3 --- /dev/null +++ b/deploy_polygon/008_config_opWETHgrow.ts @@ -0,0 +1,116 @@ +import { BigNumber } from "ethers"; +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const registryProxyAddress = (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opWETHgrowProxyAddress = (await deployments.get("opWMATICgrowProxy")).address; + + const opWETHgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWETHgrowProxyAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opWETHgrow"); + console.log("\n"); + const expectedRiskProfileCode = BigNumber.from("1"); + const _vaultConfiguration_ = await opWETHgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opWETHgrow.."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + } + + console.log("vaultConfiguration for opWETHgrow"); + console.log("\n"); + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + const _vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opWETHgrow.."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opWETHgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + await opWETHgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opWETHgrow config..."); + console.log("\n"); + const actualUserDepositCapUT = await opWETHgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opWETHgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opWETHgrowInstance.totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("5000000000000000000"); // 5 WETH user deposit cap + const expectedMinimumDepositValueUT = BigNumber.from("250000000000000000"); // 0.25 WETH minimum deposit + const expectedTotalValueLockedLimitUT = BigNumber.from("5000000000000000000000"); // 5000 WETH TVL limit + + console.log("opWETHgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWETHgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWETHgrow..."); + console.log("\n"); + await opWETHgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + } + + console.log("unpause opWETHgrow"); + console.log("\n"); + const vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opWETHgrow vault..."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setUnpaused(true); + } else { + console.log("opWETHgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opWETHgrow"); + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const actualAccountsRoot = await opWETHgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opWETHgrow vault..."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + } else { + console.log("whitelisted accounts root for opWETHgrow is as expected"); + console.log("\n"); + } +}; +export default func; +func.tags = ["ConfigopWETHgrow"]; +func.dependencies = ["ConfigopUSDCgrow"]; diff --git a/helpers/constants/contracts-data.ts b/helpers/constants/contracts-data.ts index 78d975a03..6078d64f6 100644 --- a/helpers/constants/contracts-data.ts +++ b/helpers/constants/contracts-data.ts @@ -10,8 +10,8 @@ export const RISK_PROFILES: RISK_PROFILE_DATA = [ }, { code: 1, - name: "Basic", - symbol: "bas", + name: "Growth", + symbol: "grow", canBorrow: false, poolRating: [0, 10], }, diff --git a/helpers/type.d.ts b/helpers/type.d.ts index 029163f1d..43d4aa8f5 100644 --- a/helpers/type.d.ts +++ b/helpers/type.d.ts @@ -67,7 +67,7 @@ export type DEFI_POOL_DATA = { pool: string; lpToken: string; tokens: string[]; - rewardTokens: string[]; + rewardTokens?: string[]; stakingVault?: string; pid?: string; deprecated?: boolean; From 2a6d8869ae31031f552dd5e41bc53e447abee2bb Mon Sep 17 00:00:00 2001 From: leodinh Date: Thu, 17 Mar 2022 17:21:44 -0400 Subject: [PATCH 12/52] refactor: added mumbai scripts --- ...veadapter.ts => 004_deploy_aaveadapter.ts} | 0 ...vault_usdc.ts => 005_deploy_opUSDCgrow.ts} | 20 ++- deploy_mumbai/006_config_opUSDCgrow.ts | 117 ++++++++++++++++++ deploy_mumbai/006_deploy_curveadapters.ts | 47 ------- ...lt_wmatic.ts => 007_deploy_opMATICgrow.ts} | 17 ++- deploy_mumbai/008_config_opWETHgrow.ts | 115 +++++++++++++++++ 6 files changed, 249 insertions(+), 67 deletions(-) rename deploy_mumbai/{005_deploy_aaveadapter.ts => 004_deploy_aaveadapter.ts} (100%) rename deploy_mumbai/{007_deploy_vault_usdc.ts => 005_deploy_opUSDCgrow.ts} (83%) create mode 100644 deploy_mumbai/006_config_opUSDCgrow.ts delete mode 100644 deploy_mumbai/006_deploy_curveadapters.ts rename deploy_mumbai/{008_deploy_vault_wmatic.ts => 007_deploy_opMATICgrow.ts} (83%) create mode 100644 deploy_mumbai/008_config_opWETHgrow.ts diff --git a/deploy_mumbai/005_deploy_aaveadapter.ts b/deploy_mumbai/004_deploy_aaveadapter.ts similarity index 100% rename from deploy_mumbai/005_deploy_aaveadapter.ts rename to deploy_mumbai/004_deploy_aaveadapter.ts diff --git a/deploy_mumbai/007_deploy_vault_usdc.ts b/deploy_mumbai/005_deploy_opUSDCgrow.ts similarity index 83% rename from deploy_mumbai/007_deploy_vault_usdc.ts rename to deploy_mumbai/005_deploy_opUSDCgrow.ts index a99acfd99..486303efd 100644 --- a/deploy_mumbai/007_deploy_vault_usdc.ts +++ b/deploy_mumbai/005_deploy_opUSDCgrow.ts @@ -3,21 +3,20 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; import { TypedMumbaiTokens } from "../helpers/data"; - +import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; - const riskProfileCode = 2; + const riskProfileCode = 1; const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = TypedMumbaiTokens.USDC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); const vaultAddress = ( - await deploy("VaultUSDCV2", { + await deploy("opUSDCgrow", { from: await owner.getAddress(), args: [ registryAddress, @@ -27,12 +26,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { RISK_PROFILES[riskProfileCode].symbol, ], log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, + contract: ESSENTIAL_CONTRACTS.VAULT, }) ).address; const vaultProxyAddress = ( - await deploy("VaultUSDCProxyV2", { + await deploy("opUSDCgrowProxy", { from: await owner.getAddress(), args: [vaultAddress, await admin.getAddress(), "0x"], log: true, @@ -40,12 +39,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }) ).address; - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ registryAddress, - underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.mumbai.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, @@ -53,4 +51,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["VaultUSDCV2"]; +func.tags = ["opUSDCgrow"]; diff --git a/deploy_mumbai/006_config_opUSDCgrow.ts b/deploy_mumbai/006_config_opUSDCgrow.ts new file mode 100644 index 000000000..784fac2db --- /dev/null +++ b/deploy_mumbai/006_config_opUSDCgrow.ts @@ -0,0 +1,117 @@ +import { BigNumber } from "ethers"; +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const registryProxyAddress = (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opUSDCgrowProxyAddress = (await deployments.get("opUSDCgrowProxy")).address; + + const opUSDCgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opUSDCgrowProxyAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opUSDCgrow"); + console.log("\n"); + const expectedRiskProfileCode = BigNumber.from("1"); + const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opUSDCgrow.."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + } + + console.log("vaultConfiguration for opUSDCgrow"); + console.log("\n"); + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + await opUSDCgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opUSDCgrow config..."); + console.log("\n"); + + const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC + const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 + + console.log("opUSDCgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); + console.log("\n"); + await opUSDCgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + } + + console.log("unpause opUSDCgrow"); + console.log("\n"); + const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opUSDCgrow vault..."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); + } else { + console.log("opUSDCgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opUSDCgrow"); + console.log("\n"); + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const actualAccountsRoot = await opUSDCgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opUSDCgrow vault..."); + console.log("\n"); + await opUSDCgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + } else { + console.log("whitelisted accounts root for opUSDCgrow is as expected"); + console.log("\n"); + } +}; +export default func; +func.tags = ["ConfigopUSDCgrow"]; +func.dependencies = ["StrategyProvider"]; diff --git a/deploy_mumbai/006_deploy_curveadapters.ts b/deploy_mumbai/006_deploy_curveadapters.ts deleted file mode 100644 index d03319910..000000000 --- a/deploy_mumbai/006_deploy_curveadapters.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_ADAPTERS, CURVE_PROTOCOLS } from "../helpers/constants/adapters-polygon"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; -import { TypedMumbaiTokens } from "../helpers/data"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const curveAdapters: { [name: string]: string } = {}; - for (let i = 0; i < CURVE_ADAPTERS.length; i++) { - curveAdapters[CURVE_ADAPTERS[i]] = ( - await deploy(CURVE_ADAPTERS[i], { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_ADAPTERS[i], - }) - ).address; - } - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let i = 0; i < CURVE_ADAPTERS.length; i += 1) { - for (let j = 0; j < tokenKeys.length; j += 1) { - if (TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]] && TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]]) { - liquidityPoolsAddressesMapAdapter.push([ - TypedMumbaiDefiPools[CURVE_PROTOCOLS[i]][tokenKeys[j]].lpToken, - curveAdapters[CURVE_ADAPTERS[i]], - ]); - } - } - } - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["Setup"]; diff --git a/deploy_mumbai/008_deploy_vault_wmatic.ts b/deploy_mumbai/007_deploy_opMATICgrow.ts similarity index 83% rename from deploy_mumbai/008_deploy_vault_wmatic.ts rename to deploy_mumbai/007_deploy_opMATICgrow.ts index b86db9c7f..19fca70d5 100644 --- a/deploy_mumbai/008_deploy_vault_wmatic.ts +++ b/deploy_mumbai/007_deploy_opMATICgrow.ts @@ -10,14 +10,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments } = hre; const [owner, admin] = await hre.ethers.getSigners(); const { deploy } = deployments; - const riskProfileCode = 2; + const riskProfileCode = 1; const registryAddress = (await deployments.get("RegistryProxy")).address; const underlyingToken = TypedMumbaiTokens.WMATIC; const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); const underlyingTokenName = await tokenContract.name(); const underlyingTokenSymbol = await tokenContract.symbol(); const vaultAddress = ( - await deploy("VaultWMATICV2", { + await deploy("opWMATICgrow", { from: await owner.getAddress(), args: [ registryAddress, @@ -27,12 +27,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { RISK_PROFILES[riskProfileCode].symbol, ], log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_V2, + contract: ESSENTIAL_CONTRACTS.VAULT, }) ).address; const vaultProxyAddress = ( - await deploy("VaultUSDCProxyV2", { + await deploy("opWMATICgrowProxy", { from: await owner.getAddress(), args: [vaultAddress, await admin.getAddress(), "0x"], log: true, @@ -40,12 +40,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }) ).address; - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT_V2, vaultProxyAddress, owner); + const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - await executeFunc(vault, owner, "initialize(address,address,bytes32,string,string,uint256)", [ + await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ registryAddress, - underlyingToken, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.mumbai.toString()), + generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), underlyingTokenName, underlyingTokenSymbol, riskProfileCode, @@ -53,4 +52,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = ["VaultWMATICV2"]; +func.tags = ["opWMATICgrow"]; diff --git a/deploy_mumbai/008_config_opWETHgrow.ts b/deploy_mumbai/008_config_opWETHgrow.ts new file mode 100644 index 000000000..a6d7424fe --- /dev/null +++ b/deploy_mumbai/008_config_opWETHgrow.ts @@ -0,0 +1,115 @@ +import { BigNumber } from "ethers"; +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const registryProxyAddress = (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opWETHgrowProxyAddress = (await deployments.get("opWMATICgrowProxy")).address; + + const opWETHgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWETHgrowProxyAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opWETHgrow"); + console.log("\n"); + const expectedRiskProfileCode = BigNumber.from("1"); + const _vaultConfiguration_ = await opWETHgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opWETHgrow.."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + } + + console.log("vaultConfiguration for opWETHgrow"); + console.log("\n"); + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + const _vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opWETHgrow.."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opWETHgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + await opWETHgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opWETHgrow config..."); + console.log("\n"); + const actualUserDepositCapUT = await opWETHgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opWETHgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opWETHgrowInstance.totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("5000000000000000000"); // 5 WETH user deposit cap + const expectedMinimumDepositValueUT = BigNumber.from("250000000000000000"); // 0.25 WETH minimum deposit + const expectedTotalValueLockedLimitUT = BigNumber.from("5000000000000000000000"); // 5000 WETH TVL limit + + console.log("opWETHgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWETHgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWETHgrow..."); + console.log("\n"); + await opWETHgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + } + + console.log("unpause opWETHgrow"); + console.log("\n"); + const vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opWETHgrow vault..."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setUnpaused(true); + } else { + console.log("opWETHgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opWETHgrow"); + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const actualAccountsRoot = await opWETHgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opWETHgrow vault..."); + console.log("\n"); + await opWETHgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + } else { + console.log("whitelisted accounts root for opWETHgrow is as expected"); + console.log("\n"); + } +}; +export default func; +func.tags = ["ConfigopWETHgrow"]; +func.dependencies = ["ConfigopUSDCgrow"]; From be51c822f10c5a8564092cf0713da0133ef15744 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 23 Mar 2022 18:28:37 -0400 Subject: [PATCH 13/52] refactor(deploy): for mumbai --- deploy/001_deploy_registryproxy.ts | 9 +++-- deploy/002_deploy_registry.ts | 52 ++++++++++----------------- deploy/004_deploy_riskmanager.ts | 6 ++-- deploy/005_deploy_strategyprovider.ts | 2 +- 4 files changed, 29 insertions(+), 40 deletions(-) diff --git a/deploy/001_deploy_registryproxy.ts b/deploy/001_deploy_registryproxy.ts index b8241baaa..3bb996584 100644 --- a/deploy/001_deploy_registryproxy.ts +++ b/deploy/001_deploy_registryproxy.ts @@ -6,7 +6,12 @@ import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-na const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; -const func: DeployFunction = async ({ deployments, getNamedAccounts, getChainId }: HardhatRuntimeEnvironment) => { +const func: DeployFunction = async ({ + deployments, + getNamedAccounts, + getChainId, + tenderly, +}: HardhatRuntimeEnvironment) => { const { deploy } = deployments; const { deployer } = await getNamedAccounts(); const artifact = await deployments.getArtifact(ESSENTIAL_CONTRACTS.REGISTRY_PROXY); @@ -29,7 +34,7 @@ const func: DeployFunction = async ({ deployments, getNamedAccounts, getChainId if (result.newlyDeployed) { const registryProxy = await deployments.get("RegistryProxy"); if (networkName === "tenderly") { - await hre.tenderly.verify({ + await tenderly.verify({ name: "RegistryProxy", address: registryProxy.address, constructorArguments: [], diff --git a/deploy/002_deploy_registry.ts b/deploy/002_deploy_registry.ts index 10e304f09..82b73da8f 100644 --- a/deploy/002_deploy_registry.ts +++ b/deploy/002_deploy_registry.ts @@ -64,17 +64,23 @@ const func: DeployFunction = async ({ console.log("registryV2.address ", registryV2.address); console.log("\n"); if (getAddress(registryImplementation) != getAddress(registryV2.address)) { - console.log("\n"); - console.log("operator setting pending implementation..."); - console.log("\n"); - const setPendingImplementationTx = await registryProxyInstance - .connect(operatorSigner) - .setPendingImplementation(registryV2.address); - await setPendingImplementationTx.wait(); + const pendingImplementation = await registryProxyInstance.pendingRegistryImplementation(); + if (getAddress(pendingImplementation) != getAddress(registryV2.address)) { + console.log("\n"); + console.log("operator setting pending implementation..."); + console.log("\n"); + const setPendingImplementationTx = await registryProxyInstance + .connect(operatorSigner) + .setPendingImplementation(registryV2.address); + await setPendingImplementationTx.wait(1); + } else { + console.log("Pending implementation is already set"); + console.log("\n"); + } console.log("governance upgrading Registry..."); console.log("\n"); const becomeTx = await registryV2Instance.connect(governanceSigner).become(registryProxyAddress); - await becomeTx.wait(); + await becomeTx.wait(1); console.log("Registry implementation after ", await registryProxyInstance.registryImplementation()); console.log("\n"); } @@ -105,7 +111,7 @@ const func: DeployFunction = async ({ ]); } - if (chainId != "42") { + if (!["42", "80001", "137"].includes(chainId)) { const wethApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].WETH.address); if (wethApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WETH.hash)) { @@ -127,35 +133,13 @@ const func: DeployFunction = async ({ } } - if (chainId == "137") { - const wmaticApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address); - - if (wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { - console.log("only set WMATIC hash"); - console.log("\n"); - onlySetTokensHash.push([ - MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, - [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], - ]); - } - - if (!wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { - console.log("approve WMATIC and set hash"); - console.log("\n"); - approveTokenAndMapHash.push([ - MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, - [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], - ]); - } - } - if (approveTokenAndMapHash.length > 0) { console.log("approve token and map hash"); console.log("\n"); const approveTokenAndMapToTokensHashTx = await registryV2Instance .connect(operatorSigner) ["approveTokenAndMapToTokensHash((bytes32,address[])[])"](approveTokenAndMapHash); - await approveTokenAndMapToTokensHashTx.wait(); + await approveTokenAndMapToTokensHashTx.wait(1); } if (onlySetTokensHash.length > 0) { @@ -164,7 +148,7 @@ const func: DeployFunction = async ({ const onlyMapToTokensHashTx = await registryV2Instance .connect(operatorSigner) ["setTokensHashToTokens((bytes32,address[])[])"](onlySetTokensHash); - await onlyMapToTokensHashTx.wait(); + await onlyMapToTokensHashTx.wait(1); } // add risk profile @@ -177,7 +161,7 @@ const func: DeployFunction = async ({ const addRiskProfileTx = await registryV2Instance .connect(riskOperatorSigner) ["addRiskProfile(uint256,string,string,bool,(uint8,uint8))"]("1", "Growth", "grow", false, [0, 100]); // code,name,symbol,canBorrow,pool rating range - await addRiskProfileTx.wait(); + await addRiskProfileTx.wait(1); } else { console.log("Already configured risk profile"); console.log("\n"); diff --git a/deploy/004_deploy_riskmanager.ts b/deploy/004_deploy_riskmanager.ts index 370a844b2..4dda55a55 100644 --- a/deploy/004_deploy_riskmanager.ts +++ b/deploy/004_deploy_riskmanager.ts @@ -72,15 +72,15 @@ const func: DeployFunction = async ({ const setPendingImplementationTx = await riskManagerInstance .connect(operatorSigner) .setPendingImplementation(riskManagerV2.address); - await setPendingImplementationTx.wait(); + await setPendingImplementationTx.wait(1); console.log("governance upgrading risk manager..."); console.log("\n"); const becomeTx = await riskManagerV2Instance.connect(governanceSigner).become(riskManagerProxyAddress); - await becomeTx.wait(); + await becomeTx.wait(1); console.log("operator registering upgraded RiskManager ..."); console.log("\n"); const setRiskManagerTx = await registryV2Instance.connect(operatorSigner).setRiskManager(riskManagerProxyAddress); - await setRiskManagerTx.wait(); + await setRiskManagerTx.wait(1); } else { console.log("RiskManager is already upgraded"); console.log("\n"); diff --git a/deploy/005_deploy_strategyprovider.ts b/deploy/005_deploy_strategyprovider.ts index cce033abf..1f385fe9b 100644 --- a/deploy/005_deploy_strategyprovider.ts +++ b/deploy/005_deploy_strategyprovider.ts @@ -56,7 +56,7 @@ const func: DeployFunction = async ({ const setStrategyProviderTx = await registryV2Instance .connect(operatorSigner) .setStrategyProvider(strategyProviderV2.address); - await setStrategyProviderTx.wait(); + await setStrategyProviderTx.wait(1); } else { console.log("StrategyProvider already registered"); console.log("\n"); From 3e479d0defa211c30bb0958fdbaaece7dc8e2848 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 23 Mar 2022 18:38:22 -0400 Subject: [PATCH 14/52] refactor(deploy): for polygon --- deploy/003_deploy_riskmanagerproxy.ts | 2 +- deploy/004_deploy_riskmanager.ts | 2 +- deploy/005_deploy_strategyprovider.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/003_deploy_riskmanagerproxy.ts b/deploy/003_deploy_riskmanagerproxy.ts index 420ef383f..d2b8fc89d 100644 --- a/deploy/003_deploy_riskmanagerproxy.ts +++ b/deploy/003_deploy_riskmanagerproxy.ts @@ -51,4 +51,4 @@ const func: DeployFunction = async ({ deployments, getNamedAccounts, getChainId }; export default func; func.tags = ["RiskManagerProxy"]; -func.dependencies = ["RegistryProxy"]; +func.dependencies = ["Registry"]; diff --git a/deploy/004_deploy_riskmanager.ts b/deploy/004_deploy_riskmanager.ts index 4dda55a55..6f9a16aab 100644 --- a/deploy/004_deploy_riskmanager.ts +++ b/deploy/004_deploy_riskmanager.ts @@ -110,4 +110,4 @@ const func: DeployFunction = async ({ }; export default func; func.tags = ["RiskManager"]; -func.dependencies = ["RegistryProxy"]; +func.dependencies = ["RiskManagerProxy"]; diff --git a/deploy/005_deploy_strategyprovider.ts b/deploy/005_deploy_strategyprovider.ts index 1f385fe9b..0808bec6b 100644 --- a/deploy/005_deploy_strategyprovider.ts +++ b/deploy/005_deploy_strategyprovider.ts @@ -87,4 +87,4 @@ const func: DeployFunction = async ({ }; export default func; func.tags = ["StrategyProvider"]; -func.dependencies = ["RegistryProxy"]; +func.dependencies = ["RegistryProxy", "Registry"]; From 747e1f3ce529370f2c1d102f0f94678dbaa63b34 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 28 Mar 2022 17:32:25 -0400 Subject: [PATCH 15/52] feat(submodule): add polyogon adapters --- .gitmodules | 9 +++++++++ contracts/protocol/aave-polygon-adapter | 1 + contracts/protocol/curve-polygon-adapter | 1 + contracts/protocol/sushiswap-farm-polygon | 1 + 4 files changed, 12 insertions(+) create mode 160000 contracts/protocol/aave-polygon-adapter create mode 160000 contracts/protocol/curve-polygon-adapter create mode 160000 contracts/protocol/sushiswap-farm-polygon diff --git a/.gitmodules b/.gitmodules index dd76c9821..73d249607 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,12 @@ [submodule "contracts/protocol/curve-metapool-gauge-adapter"] path = contracts/protocol/curve-metapool-gauge-adapter url = git@github.com:Opty-Fi/curve-metapool-gauge-adapter.git +[submodule "contracts/protocol/curve-polygon-adapter"] + path = contracts/protocol/curve-polygon-adapter + url = git@github.com:Opty-Fi/curve-polygon-adapter.git +[submodule "contracts/protocol/aave-polygon-adapter"] + path = contracts/protocol/aave-polygon-adapter + url = git@github.com:Opty-Fi/aave-polygon-adapter.git +[submodule "contracts/protocol/sushi-farm-polygon"] + path = contracts/protocol/sushi-farm-polygon + url = git@github.com:Opty-Fi/sushiswap-farm-polygon.git diff --git a/contracts/protocol/aave-polygon-adapter b/contracts/protocol/aave-polygon-adapter new file mode 160000 index 000000000..4a8a0c790 --- /dev/null +++ b/contracts/protocol/aave-polygon-adapter @@ -0,0 +1 @@ +Subproject commit 4a8a0c7906b19164b38faa01b453bf7ca113c67f diff --git a/contracts/protocol/curve-polygon-adapter b/contracts/protocol/curve-polygon-adapter new file mode 160000 index 000000000..d891e369b --- /dev/null +++ b/contracts/protocol/curve-polygon-adapter @@ -0,0 +1 @@ +Subproject commit d891e369bc9efbd23d516a965b644d8938d6911f diff --git a/contracts/protocol/sushiswap-farm-polygon b/contracts/protocol/sushiswap-farm-polygon new file mode 160000 index 000000000..4cf963f6b --- /dev/null +++ b/contracts/protocol/sushiswap-farm-polygon @@ -0,0 +1 @@ +Subproject commit 4cf963f6b984efd642a997226afe1e9abbae056d From 4ac9e1370193770e19839f556f26fd66fee3c579 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 28 Mar 2022 23:33:44 -0400 Subject: [PATCH 16/52] feat(deploy): mumbai and polygon adapters --- .gitmodules | 4 +- deploy/002_deploy_registry.ts | 34 ++--- deploy/005_deploy_strategyprovider.ts | 2 +- .../001_deploy_curvestableswapadapter.ts | 47 ------- deploy_mumbai/002_deploy_curvegaugeadapter.ts | 43 ------- .../003_deploy_curvemetapoolfactoryadapter.ts | 46 ------- deploy_mumbai/004_deploy_aaveadapter.ts | 40 ------ deploy_mumbai/005_deploy_aaveadapter.ts | 60 +++++++++ deploy_mumbai/005_deploy_opUSDCgrow.ts | 54 -------- deploy_mumbai/006_config_opUSDCgrow.ts | 117 ----------------- deploy_mumbai/007_deploy_opMATICgrow.ts | 55 -------- deploy_mumbai/008_config_opWETHgrow.ts | 115 ----------------- .../001_deploy_curvestableswapadapter.ts | 83 +++++++----- .../002_deploy_curvegaugeadapter.ts | 45 ------- .../002_deploy_curvemetapoolfactoryadapter.ts | 60 +++++++++ .../003_deploy_curvegaugeadapter.ts | 60 +++++++++ .../003_deploy_curvemetapoolfactoryadapter.ts | 48 ------- deploy_polygon/004_deploy_aaveadapter.ts | 42 ------- .../004_deploy_beefyfinanceadapter.ts | 60 +++++++++ deploy_polygon/005_deploy_aaveadapter.ts | 60 +++++++++ deploy_polygon/005_deploy_opUSDCgrow.ts | 54 -------- deploy_polygon/006_config_opUSDCgrow.ts | 118 ------------------ .../006_deploy_sushiswapfarmadapter.ts | 60 +++++++++ deploy_polygon/007_deploy_opMATICgrow.ts | 55 -------- deploy_polygon/008_config_opWETHgrow.ts | 116 ----------------- hardhat.config.ts | 2 +- 26 files changed, 431 insertions(+), 1049 deletions(-) delete mode 100644 deploy_mumbai/001_deploy_curvestableswapadapter.ts delete mode 100644 deploy_mumbai/002_deploy_curvegaugeadapter.ts delete mode 100644 deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts delete mode 100644 deploy_mumbai/004_deploy_aaveadapter.ts create mode 100644 deploy_mumbai/005_deploy_aaveadapter.ts delete mode 100644 deploy_mumbai/005_deploy_opUSDCgrow.ts delete mode 100644 deploy_mumbai/006_config_opUSDCgrow.ts delete mode 100644 deploy_mumbai/007_deploy_opMATICgrow.ts delete mode 100644 deploy_mumbai/008_config_opWETHgrow.ts delete mode 100644 deploy_polygon/002_deploy_curvegaugeadapter.ts create mode 100644 deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts create mode 100644 deploy_polygon/003_deploy_curvegaugeadapter.ts delete mode 100644 deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts delete mode 100644 deploy_polygon/004_deploy_aaveadapter.ts create mode 100644 deploy_polygon/004_deploy_beefyfinanceadapter.ts create mode 100644 deploy_polygon/005_deploy_aaveadapter.ts delete mode 100644 deploy_polygon/005_deploy_opUSDCgrow.ts delete mode 100644 deploy_polygon/006_config_opUSDCgrow.ts create mode 100644 deploy_polygon/006_deploy_sushiswapfarmadapter.ts delete mode 100644 deploy_polygon/007_deploy_opMATICgrow.ts delete mode 100644 deploy_polygon/008_config_opWETHgrow.ts diff --git a/.gitmodules b/.gitmodules index 73d249607..5663a876f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,6 @@ [submodule "contracts/protocol/aave-polygon-adapter"] path = contracts/protocol/aave-polygon-adapter url = git@github.com:Opty-Fi/aave-polygon-adapter.git -[submodule "contracts/protocol/sushi-farm-polygon"] - path = contracts/protocol/sushi-farm-polygon +[submodule "contracts/protocol/sushiswap-farm-polygon"] + path = contracts/protocol/sushiswap-farm-polygon url = git@github.com:Opty-Fi/sushiswap-farm-polygon.git diff --git a/deploy/002_deploy_registry.ts b/deploy/002_deploy_registry.ts index b8f2ac6ba..f276b949f 100644 --- a/deploy/002_deploy_registry.ts +++ b/deploy/002_deploy_registry.ts @@ -93,24 +93,26 @@ const func: DeployFunction = async ({ const onlySetTokensHash = []; const approveTokenAndMapHash = []; const tokenHashes: string[] = await registryV2Instance.getTokenHashes(); - const usdcApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address); + if (!["80001", "137"].includes(chainId)) { + const usdcApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address); - if (usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { - console.log("only set USDC hash"); - console.log("\n"); - onlySetTokensHash.push([ - MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, - [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], - ]); - } + if (usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("only set USDC hash"); + console.log("\n"); + onlySetTokensHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } - if (!usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { - console.log("approve USDC and set hash"); - console.log("\n"); - approveTokenAndMapHash.push([ - MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, - [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], - ]); + if (!usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("approve USDC and set hash"); + console.log("\n"); + approveTokenAndMapHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } } if (!["42", "80001", "137"].includes(chainId)) { diff --git a/deploy/005_deploy_strategyprovider.ts b/deploy/005_deploy_strategyprovider.ts index afca946bd..54ceb5e22 100644 --- a/deploy/005_deploy_strategyprovider.ts +++ b/deploy/005_deploy_strategyprovider.ts @@ -89,4 +89,4 @@ const func: DeployFunction = async ({ }; export default func; func.tags = ["StrategyProvider"]; -func.dependencies = ["RegistryProxy", "Registry"]; +func.dependencies = ["Registry"]; diff --git a/deploy_mumbai/001_deploy_curvestableswapadapter.ts b/deploy_mumbai/001_deploy_curvestableswapadapter.ts deleted file mode 100644 index 95e638e6c..000000000 --- a/deploy_mumbai/001_deploy_curvestableswapadapter.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_STABLE_SWAP_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; -import { TypedMumbaiTokens } from "../helpers/data"; - -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const curveAdapter = ( - await deploy(CURVE_STABLE_SWAP_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_STABLE_SWAP_ADAPTER, - }) - ).address; - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let j = 0; j < tokenKeys.length; j += 1) { - if ( - TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER] && - TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]] - ) { - liquidityPoolsAddressesMapAdapter.push([ - TypedMumbaiDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); - } - } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["CurveStableSwapAdapter"]; diff --git a/deploy_mumbai/002_deploy_curvegaugeadapter.ts b/deploy_mumbai/002_deploy_curvegaugeadapter.ts deleted file mode 100644 index 1a80400e1..000000000 --- a/deploy_mumbai/002_deploy_curvegaugeadapter.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_GAUGE_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; -import { TypedMumbaiTokens } from "../helpers/data"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const curveAdapter = ( - await deploy(CURVE_GAUGE_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_GAUGE_ADAPTER, - }) - ).address; - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let j = 0; j < tokenKeys.length; j += 1) { - if (TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER] && TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]]) { - liquidityPoolsAddressesMapAdapter.push([ - TypedMumbaiDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); - } - } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts b/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts deleted file mode 100644 index d254d8f88..000000000 --- a/deploy_mumbai/003_deploy_curvemetapoolfactoryadapter.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_METAPOOL_FACTORY_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; -import { TypedMumbaiTokens } from "../helpers/data"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const curveAdapter = ( - await deploy(CURVE_METAPOOL_FACTORY_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_METAPOOL_FACTORY_ADAPTER, - }) - ).address; - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let j = 0; j < tokenKeys.length; j += 1) { - if ( - TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER] && - TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]] - ) { - liquidityPoolsAddressesMapAdapter.push([ - TypedMumbaiDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); - } - } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_mumbai/004_deploy_aaveadapter.ts b/deploy_mumbai/004_deploy_aaveadapter.ts deleted file mode 100644 index 6416753ac..000000000 --- a/deploy_mumbai/004_deploy_aaveadapter.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { AAVE_ADAPTER_NAME } from "../helpers/constants/adapters-polygon"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedMumbaiDefiPools } from "../helpers/data/polygon_defiPools"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; -import { TypedMumbaiTokens } from "../helpers/data"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_V2, registryAddress); - const adapter = ( - await deploy(AAVE_ADAPTER_NAME, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: AAVE_ADAPTER_NAME, - }) - ).address; - - const tokenKeys = Object.keys(TypedMumbaiTokens); - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2( - owner, - registryContract, - [], - tokenKeys.map(token => [adapter, TypedMumbaiDefiPools[AAVE_ADAPTER_NAME][token].lpToken]), - false, - ); - } -}; - -export default func; -func.tags = ["Setup"]; diff --git a/deploy_mumbai/005_deploy_aaveadapter.ts b/deploy_mumbai/005_deploy_aaveadapter.ts new file mode 100644 index 000000000..26c6f937c --- /dev/null +++ b/deploy_mumbai/005_deploy_aaveadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("AaveAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("AaveAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const aaveAdapter = await deployments.get("AaveAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "AaveAdapter", + address: aaveAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "AaveAdapter", + address: aaveAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["MumbaiAaveAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_mumbai/005_deploy_opUSDCgrow.ts b/deploy_mumbai/005_deploy_opUSDCgrow.ts deleted file mode 100644 index 486303efd..000000000 --- a/deploy_mumbai/005_deploy_opUSDCgrow.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { TypedMumbaiTokens } from "../helpers/data"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 1; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = TypedMumbaiTokens.USDC; - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("opUSDCgrow", { - from: await owner.getAddress(), - args: [ - registryAddress, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT, - }) - ).address; - - const vaultProxyAddress = ( - await deploy("opUSDCgrowProxy", { - from: await owner.getAddress(), - args: [vaultAddress, await admin.getAddress(), "0x"], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, - }) - ).address; - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - - await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ - registryAddress, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["opUSDCgrow"]; diff --git a/deploy_mumbai/006_config_opUSDCgrow.ts b/deploy_mumbai/006_config_opUSDCgrow.ts deleted file mode 100644 index 784fac2db..000000000 --- a/deploy_mumbai/006_config_opUSDCgrow.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { BigNumber } from "ethers"; -import { DeployFunction } from "hardhat-deploy/dist/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { getRiskProfileCode, getUnpause } from "../helpers/utils"; - -const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { - const registryProxyAddress = (await deployments.get("RegistryProxy")).address; - const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); - const opUSDCgrowProxyAddress = (await deployments.get("opUSDCgrowProxy")).address; - - const opUSDCgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opUSDCgrowProxyAddress); - const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); - const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); - const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); - - console.log("set risk profile code for opUSDCgrow"); - console.log("\n"); - const expectedRiskProfileCode = BigNumber.from("1"); - const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); - if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { - console.log("risk profile code is as expected"); - console.log("\n"); - } else { - console.log("Governance setting risk profile code for opUSDCgrow.."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); - } - - console.log("vaultConfiguration for opUSDCgrow"); - console.log("\n"); - const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); - const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); - if (expectedConfig.eq(_vaultConfiguration)) { - console.log("vaultConfiguration is as expected"); - console.log("\n"); - } else { - console.log("Governance setting vault configuration for opUSDCgrow.."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); - } - - console.log("Operator setting UnderlyingTokensHash..."); - console.log("\n"); - - const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); - - if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash) { - console.log("setting tokenshash.."); - console.log("\n"); - await opUSDCgrowInstance - .connect(operatorSigner) - .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash); - } else { - console.log("Tokenshash is upto date"); - console.log("\n"); - } - - console.log("Finance operator setting opUSDCgrow config..."); - console.log("\n"); - - const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); - const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); - const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); - - const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC - const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC - const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 - - console.log("opUSDCgrow.setValueControlParams()"); - console.log("\n"); - if ( - expectedUserDepositCapUT.eq(actualUserDepositCapUT) && - expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && - expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) - ) { - console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); - console.log("\n"); - } else { - console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); - console.log("\n"); - await opUSDCgrowInstance - .connect(financeOperatorSigner) - .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); - } - - console.log("unpause opUSDCgrow"); - console.log("\n"); - const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); - const unpause = getUnpause(vaultConfiguration); - - if (!unpause) { - console.log("Governance unpausing opUSDCgrow vault..."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); - } else { - console.log("opUSDCgrow is already unpaused..."); - console.log("\n"); - } - - console.log("whitelisting for opUSDCgrow"); - console.log("\n"); - const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; - const actualAccountsRoot = await opUSDCgrowInstance.whitelistedAccountsRoot(); - if (actualAccountsRoot != expectedAccountsRoot) { - console.log("Governance setting whitelisted account root opUSDCgrow vault..."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); - } else { - console.log("whitelisted accounts root for opUSDCgrow is as expected"); - console.log("\n"); - } -}; -export default func; -func.tags = ["ConfigopUSDCgrow"]; -func.dependencies = ["StrategyProvider"]; diff --git a/deploy_mumbai/007_deploy_opMATICgrow.ts b/deploy_mumbai/007_deploy_opMATICgrow.ts deleted file mode 100644 index 19fca70d5..000000000 --- a/deploy_mumbai/007_deploy_opMATICgrow.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { TypedMumbaiTokens } from "../helpers/data"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 1; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = TypedMumbaiTokens.WMATIC; - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("opWMATICgrow", { - from: await owner.getAddress(), - args: [ - registryAddress, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT, - }) - ).address; - - const vaultProxyAddress = ( - await deploy("opWMATICgrowProxy", { - from: await owner.getAddress(), - args: [vaultAddress, await admin.getAddress(), "0x"], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, - }) - ).address; - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - - await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ - registryAddress, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["opWMATICgrow"]; diff --git a/deploy_mumbai/008_config_opWETHgrow.ts b/deploy_mumbai/008_config_opWETHgrow.ts deleted file mode 100644 index a6d7424fe..000000000 --- a/deploy_mumbai/008_config_opWETHgrow.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { BigNumber } from "ethers"; -import { DeployFunction } from "hardhat-deploy/dist/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { getRiskProfileCode, getUnpause } from "../helpers/utils"; - -const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { - const registryProxyAddress = (await deployments.get("RegistryProxy")).address; - const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); - const opWETHgrowProxyAddress = (await deployments.get("opWMATICgrowProxy")).address; - - const opWETHgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWETHgrowProxyAddress); - const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); - const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); - const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); - - console.log("set risk profile code for opWETHgrow"); - console.log("\n"); - const expectedRiskProfileCode = BigNumber.from("1"); - const _vaultConfiguration_ = await opWETHgrowInstance.vaultConfiguration(); - if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { - console.log("risk profile code is as expected"); - console.log("\n"); - } else { - console.log("Governance setting risk profile code for opWETHgrow.."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); - } - - console.log("vaultConfiguration for opWETHgrow"); - console.log("\n"); - const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); - const _vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); - if (expectedConfig.eq(_vaultConfiguration)) { - console.log("vaultConfiguration is as expected"); - console.log("\n"); - } else { - console.log("Governance setting vault configuration for opWETHgrow.."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); - } - - console.log("Operator setting UnderlyingTokensHash..."); - console.log("\n"); - - const tokensHash = await opWETHgrowInstance.underlyingTokensHash(); - - if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash) { - console.log("setting tokenshash.."); - console.log("\n"); - await opWETHgrowInstance - .connect(operatorSigner) - .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash); - } else { - console.log("Tokenshash is upto date"); - console.log("\n"); - } - - console.log("Finance operator setting opWETHgrow config..."); - console.log("\n"); - const actualUserDepositCapUT = await opWETHgrowInstance.userDepositCapUT(); - const actualMinimumDepositValueUT = await opWETHgrowInstance.minimumDepositValueUT(); - const actualTotalValueLockedLimitUT = await opWETHgrowInstance.totalValueLockedLimitUT(); - - const expectedUserDepositCapUT = BigNumber.from("5000000000000000000"); // 5 WETH user deposit cap - const expectedMinimumDepositValueUT = BigNumber.from("250000000000000000"); // 0.25 WETH minimum deposit - const expectedTotalValueLockedLimitUT = BigNumber.from("5000000000000000000000"); // 5000 WETH TVL limit - - console.log("opWETHgrow.setValueControlParams()"); - console.log("\n"); - if ( - expectedUserDepositCapUT.eq(actualUserDepositCapUT) && - expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && - expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) - ) { - console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWETHgrow"); - console.log("\n"); - } else { - console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWETHgrow..."); - console.log("\n"); - await opWETHgrowInstance - .connect(financeOperatorSigner) - .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); - } - - console.log("unpause opWETHgrow"); - console.log("\n"); - const vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); - const unpause = getUnpause(vaultConfiguration); - - if (!unpause) { - console.log("Governance unpausing opWETHgrow vault..."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setUnpaused(true); - } else { - console.log("opWETHgrow is already unpaused..."); - console.log("\n"); - } - - console.log("whitelisting for opWETHgrow"); - const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; - const actualAccountsRoot = await opWETHgrowInstance.whitelistedAccountsRoot(); - if (actualAccountsRoot != expectedAccountsRoot) { - console.log("Governance setting whitelisted account root opWETHgrow vault..."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); - } else { - console.log("whitelisted accounts root for opWETHgrow is as expected"); - console.log("\n"); - } -}; -export default func; -func.tags = ["ConfigopWETHgrow"]; -func.dependencies = ["ConfigopUSDCgrow"]; diff --git a/deploy_polygon/001_deploy_curvestableswapadapter.ts b/deploy_polygon/001_deploy_curvestableswapadapter.ts index 32318679d..2ae2dd08b 100644 --- a/deploy_polygon/001_deploy_curvestableswapadapter.ts +++ b/deploy_polygon/001_deploy_curvestableswapadapter.ts @@ -1,45 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_STABLE_SWAP_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); - const curveAdapter = ( - await deploy(CURVE_STABLE_SWAP_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_STABLE_SWAP_ADAPTER, - }) - ).address; + const artifact = await deployments.getArtifact("CurveStableSwapAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) - : []; + const result = await deploy("CurveStableSwapAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); - const liquidityPoolsAddressesMapAdapter: string[][] = []; + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const curveStableSwapAdapter = await deployments.get("CurveStableSwapAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "CurveStableSwapAdapter", + address: curveStableSwapAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); - for (let j = 0; j < tokenKeys.length; j += 1) { - if (PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER] && PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]]) { - liquidityPoolsAddressesMapAdapter.push([ - PolygonDefiPools[CURVE_STABLE_SWAP_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); + await run("verify:verify", { + name: "CurveStableSwapAdapter", + address: curveStableSwapAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } } } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } }; - export default func; -func.tags = ["CurveStableSwapAdapter"]; +func.tags = ["PolygonCurveStableSwapAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/002_deploy_curvegaugeadapter.ts b/deploy_polygon/002_deploy_curvegaugeadapter.ts deleted file mode 100644 index d2c153842..000000000 --- a/deploy_polygon/002_deploy_curvegaugeadapter.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_GAUGE_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); - const curveAdapter = ( - await deploy(CURVE_GAUGE_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_GAUGE_ADAPTER, - }) - ).address; - - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) - : []; - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let j = 0; j < tokenKeys.length; j += 1) { - if (PolygonDefiPools[CURVE_GAUGE_ADAPTER] && PolygonDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]]) { - liquidityPoolsAddressesMapAdapter.push([ - PolygonDefiPools[CURVE_GAUGE_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); - } - } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts b/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts new file mode 100644 index 000000000..5c47a4a39 --- /dev/null +++ b/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("CurveMetapoolFactoryAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("CurveMetapoolFactoryAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const curveMetapoolFactoryAdapter = await deployments.get("CurveMetapoolFactoryAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "CurveMetapoolFactoryAdapter", + address: curveMetapoolFactoryAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "CurveMetapoolFactoryAdapter", + address: curveMetapoolFactoryAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonCurveMetapoolFactoryAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/003_deploy_curvegaugeadapter.ts b/deploy_polygon/003_deploy_curvegaugeadapter.ts new file mode 100644 index 000000000..d4a79d321 --- /dev/null +++ b/deploy_polygon/003_deploy_curvegaugeadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("CurveGaugeAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("CurveGaugeAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const curveGaugeAdapter = await deployments.get("CurveGaugeAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "CurveGaugeAdapter", + address: curveGaugeAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "CurveGaugeAdapter", + address: curveGaugeAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonCurveGaugeAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts b/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts deleted file mode 100644 index 1994174bc..000000000 --- a/deploy_polygon/003_deploy_curvemetapoolfactoryadapter.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { CURVE_METAPOOL_FACTORY_ADAPTER } from "../helpers/constants/adapters-polygon"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); - const curveAdapter = ( - await deploy(CURVE_METAPOOL_FACTORY_ADAPTER, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: CURVE_METAPOOL_FACTORY_ADAPTER, - }) - ).address; - - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) - : []; - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - for (let j = 0; j < tokenKeys.length; j += 1) { - if ( - PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER] && - PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]] - ) { - liquidityPoolsAddressesMapAdapter.push([ - PolygonDefiPools[CURVE_METAPOOL_FACTORY_ADAPTER][tokenKeys[j]].lpToken, - curveAdapter, - ]); - } - } - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2(owner, registryContract, [], liquidityPoolsAddressesMapAdapter, false); - } -}; - -export default func; -func.tags = ["CurveGaugeAdapter"]; diff --git a/deploy_polygon/004_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts deleted file mode 100644 index f557170e7..000000000 --- a/deploy_polygon/004_deploy_aaveadapter.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { AAVE_ADAPTER_NAME } from "../helpers/constants/adapters-polygon"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { TypedDefiPools as PolygonDefiPools } from "../helpers/data/polygon_defiPools"; -import { approveLiquidityPoolAndMapAdaptersV2 } from "../helpers/contracts-actions"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const registryContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); - const adapter = ( - await deploy(AAVE_ADAPTER_NAME, { - from: await owner.getAddress(), - args: [registryAddress], - log: true, - contract: AAVE_ADAPTER_NAME, - }) - ).address; - - const tokenKeys = MULTI_CHAIN_VAULT_TOKENS[hre.network.name] - ? Object.keys(MULTI_CHAIN_VAULT_TOKENS[hre.network.name]) - : []; - - const liquidityPoolsAddressesMapAdapter: string[][] = []; - - if (liquidityPoolsAddressesMapAdapter.length > 0) { - await approveLiquidityPoolAndMapAdaptersV2( - owner, - registryContract, - [], - tokenKeys.map(token => [adapter, PolygonDefiPools[AAVE_ADAPTER_NAME][token].lpToken]), - false, - ); - } -}; - -export default func; -func.tags = ["AaveAdapter"]; diff --git a/deploy_polygon/004_deploy_beefyfinanceadapter.ts b/deploy_polygon/004_deploy_beefyfinanceadapter.ts new file mode 100644 index 000000000..b761a441d --- /dev/null +++ b/deploy_polygon/004_deploy_beefyfinanceadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("BeefyFinanceAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("BeefyFinanceAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const beefyFinanceAdapter = await deployments.get("BeefyFinanceAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "BeefyFinanceAdapter", + address: beefyFinanceAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "BeefyFinanceAdapter", + address: beefyFinanceAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonBeefyFinanceAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/005_deploy_aaveadapter.ts b/deploy_polygon/005_deploy_aaveadapter.ts new file mode 100644 index 000000000..7d7fc3ba5 --- /dev/null +++ b/deploy_polygon/005_deploy_aaveadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("AaveAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("AaveAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const aaveAdapter = await deployments.get("AaveAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "AaveAdapter", + address: aaveAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "AaveAdapter", + address: aaveAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonAaveAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/005_deploy_opUSDCgrow.ts b/deploy_polygon/005_deploy_opUSDCgrow.ts deleted file mode 100644 index b89a1142a..000000000 --- a/deploy_polygon/005_deploy_opUSDCgrow.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 1; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = PolygonLegos.tokens.USDC; - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("opUSDCgrow", { - from: await owner.getAddress(), - args: [ - registryAddress, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT, - }) - ).address; - - const vaultProxyAddress = ( - await deploy("opUSDCgrowProxy", { - from: await owner.getAddress(), - args: [vaultAddress, await admin.getAddress(), "0x"], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, - }) - ).address; - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - - await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ - registryAddress, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["opUSDCgrow"]; diff --git a/deploy_polygon/006_config_opUSDCgrow.ts b/deploy_polygon/006_config_opUSDCgrow.ts deleted file mode 100644 index 2ad452644..000000000 --- a/deploy_polygon/006_config_opUSDCgrow.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { BigNumber } from "ethers"; -import { DeployFunction } from "hardhat-deploy/dist/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; -import { getRiskProfileCode, getUnpause } from "../helpers/utils"; - -const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { - const registryProxyAddress = (await deployments.get("RegistryProxy")).address; - const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); - const opUSDCgrowProxyAddress = (await deployments.get("opUSDCgrowProxy")).address; - - const opUSDCgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opUSDCgrowProxyAddress); - const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); - const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); - const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); - - console.log("set risk profile code for opUSDCgrow"); - console.log("\n"); - const expectedRiskProfileCode = BigNumber.from("1"); - const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); - if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { - console.log("risk profile code is as expected"); - console.log("\n"); - } else { - console.log("Governance setting risk profile code for opUSDCgrow.."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); - } - - console.log("vaultConfiguration for opUSDCgrow"); - console.log("\n"); - const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); - const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); - if (expectedConfig.eq(_vaultConfiguration)) { - console.log("vaultConfiguration is as expected"); - console.log("\n"); - } else { - console.log("Governance setting vault configuration for opUSDCgrow.."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); - } - - console.log("Operator setting UnderlyingTokensHash..."); - console.log("\n"); - - const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); - - if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash) { - console.log("setting tokenshash.."); - console.log("\n"); - await opUSDCgrowInstance - .connect(operatorSigner) - .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].USDC.hash); - } else { - console.log("Tokenshash is upto date"); - console.log("\n"); - } - - console.log("Finance operator setting opUSDCgrow config..."); - console.log("\n"); - - const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); - const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); - const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); - - const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC - const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC - const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 - - console.log("opUSDCgrow.setValueControlParams()"); - console.log("\n"); - if ( - expectedUserDepositCapUT.eq(actualUserDepositCapUT) && - expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && - expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) - ) { - console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); - console.log("\n"); - } else { - console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); - console.log("\n"); - await opUSDCgrowInstance - .connect(financeOperatorSigner) - .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); - } - - console.log("unpause opUSDCgrow"); - console.log("\n"); - const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); - const unpause = getUnpause(vaultConfiguration); - - if (!unpause) { - console.log("Governance unpausing opUSDCgrow vault..."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); - } else { - console.log("opUSDCgrow is already unpaused..."); - console.log("\n"); - } - - console.log("whitelisting for opUSDCgrow"); - console.log("\n"); - const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; - const actualAccountsRoot = await opUSDCgrowInstance.whitelistedAccountsRoot(); - if (actualAccountsRoot != expectedAccountsRoot) { - console.log("Governance setting whitelisted account root opUSDCgrow vault..."); - console.log("\n"); - await opUSDCgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); - } else { - console.log("whitelisted accounts root for opUSDCgrow is as expected"); - console.log("\n"); - } -}; -export default func; -func.tags = ["ConfigopUSDCgrow"]; -func.dependencies = ["StrategyProvider"]; diff --git a/deploy_polygon/006_deploy_sushiswapfarmadapter.ts b/deploy_polygon/006_deploy_sushiswapfarmadapter.ts new file mode 100644 index 000000000..27310b1b7 --- /dev/null +++ b/deploy_polygon/006_deploy_sushiswapfarmadapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("SushiswapFarmAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("SushiswapFarmAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const sushiswapFarmAdapter = await deployments.get("SushiswapFarmAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "SushiswapFarmAdapter", + address: sushiswapFarmAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "SushiswapFarmAdapter", + address: sushiswapFarmAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonSushiswapFarmAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/007_deploy_opMATICgrow.ts b/deploy_polygon/007_deploy_opMATICgrow.ts deleted file mode 100644 index 57b257af0..000000000 --- a/deploy_polygon/007_deploy_opMATICgrow.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { DeployFunction } from "hardhat-deploy/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { executeFunc, generateTokenHashV2 } from "../helpers/helpers"; -import { RISK_PROFILES } from "../helpers/constants/contracts-data"; -import { legos as PolygonLegos } from "@optyfi/defi-legos/polygon"; -import { NETWORKS_CHAIN_ID_HEX } from "../helper-hardhat-config"; - -const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments } = hre; - const [owner, admin] = await hre.ethers.getSigners(); - const { deploy } = deployments; - const riskProfileCode = 1; - const registryAddress = (await deployments.get("RegistryProxy")).address; - const underlyingToken = PolygonLegos.tokens.WMATIC; - const tokenContract = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, underlyingToken); - const underlyingTokenName = await tokenContract.name(); - const underlyingTokenSymbol = await tokenContract.symbol(); - const vaultAddress = ( - await deploy("opWMATICgrow", { - from: await owner.getAddress(), - args: [ - registryAddress, - underlyingTokenName, - underlyingTokenSymbol, - RISK_PROFILES[riskProfileCode].name, - RISK_PROFILES[riskProfileCode].symbol, - ], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT, - }) - ).address; - - const vaultProxyAddress = ( - await deploy("opWMATICgrowProxy", { - from: await owner.getAddress(), - args: [vaultAddress, await admin.getAddress(), "0x"], - log: true, - contract: ESSENTIAL_CONTRACTS.VAULT_PROXY_V2, - }) - ).address; - - const vault = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vaultProxyAddress, owner); - - await executeFunc(vault, owner, "initialize(address,bytes32,string,string,uint256)", [ - registryAddress, - generateTokenHashV2([underlyingToken], NETWORKS_CHAIN_ID_HEX.polygon.toString()), - underlyingTokenName, - underlyingTokenSymbol, - riskProfileCode, - ]); -}; - -export default func; -func.tags = ["opWMATICgrow"]; diff --git a/deploy_polygon/008_config_opWETHgrow.ts b/deploy_polygon/008_config_opWETHgrow.ts deleted file mode 100644 index 828b64cd3..000000000 --- a/deploy_polygon/008_config_opWETHgrow.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { BigNumber } from "ethers"; -import { DeployFunction } from "hardhat-deploy/dist/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; -import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; -import { getRiskProfileCode, getUnpause } from "../helpers/utils"; - -const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { - const registryProxyAddress = (await deployments.get("RegistryProxy")).address; - const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); - const opWETHgrowProxyAddress = (await deployments.get("opWMATICgrowProxy")).address; - - const opWETHgrowInstance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWETHgrowProxyAddress); - const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); - const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); - const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); - - console.log("set risk profile code for opWETHgrow"); - console.log("\n"); - const expectedRiskProfileCode = BigNumber.from("1"); - const _vaultConfiguration_ = await opWETHgrowInstance.vaultConfiguration(); - if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { - console.log("risk profile code is as expected"); - console.log("\n"); - } else { - console.log("Governance setting risk profile code for opWETHgrow.."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); - } - - console.log("vaultConfiguration for opWETHgrow"); - console.log("\n"); - const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); - const _vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); - if (expectedConfig.eq(_vaultConfiguration)) { - console.log("vaultConfiguration is as expected"); - console.log("\n"); - } else { - console.log("Governance setting vault configuration for opWETHgrow.."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); - } - - console.log("Operator setting UnderlyingTokensHash..."); - console.log("\n"); - - const tokensHash = await opWETHgrowInstance.underlyingTokensHash(); - - if (tokensHash != MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash) { - console.log("setting tokenshash.."); - console.log("\n"); - await opWETHgrowInstance - .connect(operatorSigner) - .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS["polygon"].WETH.hash); - } else { - console.log("Tokenshash is upto date"); - console.log("\n"); - } - - console.log("Finance operator setting opWETHgrow config..."); - console.log("\n"); - const actualUserDepositCapUT = await opWETHgrowInstance.userDepositCapUT(); - const actualMinimumDepositValueUT = await opWETHgrowInstance.minimumDepositValueUT(); - const actualTotalValueLockedLimitUT = await opWETHgrowInstance.totalValueLockedLimitUT(); - - const expectedUserDepositCapUT = BigNumber.from("5000000000000000000"); // 5 WETH user deposit cap - const expectedMinimumDepositValueUT = BigNumber.from("250000000000000000"); // 0.25 WETH minimum deposit - const expectedTotalValueLockedLimitUT = BigNumber.from("5000000000000000000000"); // 5000 WETH TVL limit - - console.log("opWETHgrow.setValueControlParams()"); - console.log("\n"); - if ( - expectedUserDepositCapUT.eq(actualUserDepositCapUT) && - expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && - expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) - ) { - console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWETHgrow"); - console.log("\n"); - } else { - console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWETHgrow..."); - console.log("\n"); - await opWETHgrowInstance - .connect(financeOperatorSigner) - .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); - } - - console.log("unpause opWETHgrow"); - console.log("\n"); - const vaultConfiguration = await opWETHgrowInstance.vaultConfiguration(); - const unpause = getUnpause(vaultConfiguration); - - if (!unpause) { - console.log("Governance unpausing opWETHgrow vault..."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setUnpaused(true); - } else { - console.log("opWETHgrow is already unpaused..."); - console.log("\n"); - } - - console.log("whitelisting for opWETHgrow"); - const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; - const actualAccountsRoot = await opWETHgrowInstance.whitelistedAccountsRoot(); - if (actualAccountsRoot != expectedAccountsRoot) { - console.log("Governance setting whitelisted account root opWETHgrow vault..."); - console.log("\n"); - await opWETHgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); - } else { - console.log("whitelisted accounts root for opWETHgrow is as expected"); - console.log("\n"); - } -}; -export default func; -func.tags = ["ConfigopWETHgrow"]; -func.dependencies = ["ConfigopUSDCgrow"]; diff --git a/hardhat.config.ts b/hardhat.config.ts index 25a8f1105..1afb69954 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -151,7 +151,7 @@ const config: HardhatUserConfig = { tenderly: getCommonNetworkConfig( NETWORKS_RPC_URL[eEVMNetwork.tenderly], eEVMNetwork.tenderly, - NETWORKS_CHAIN_ID[eEVMNetwork.tenderly], + NETWORKS_CHAIN_ID[NETWORK_NAME as eEVMNetwork], ), hardhat: { From d8154ed17d53464e1648d251cb82f265f31c3d9c Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 28 Mar 2022 23:54:15 -0400 Subject: [PATCH 17/52] feat(deploy): init deploy files --- ...veadapter.ts => 001_deploy_aaveadapter.ts} | 0 ..._approveandmaptokenshashtotokens_tokens.ts | 63 ++++++++++++++ ..._approveandmaptokenshashtotokens_tokens.ts | 83 +++++++++++++++++++ deploy_polygon/008_approve_liquidity_pools.ts | 0 deploy_polygon/009_rate_liquidity_pool.ts | 0 deploy_polygon/010_deploy_opUSDCgrow_proxy.ts | 0 deploy_polygon/011_deploy_opUSDCgrow.ts | 0 .../012_deploy_opWMATICgrow_proxy.ts | 0 deploy_polygon/013_deploy_opWMATICgrow.ts | 0 helpers/constants/tokens.ts | 14 ++++ 10 files changed, 160 insertions(+) rename deploy_mumbai/{005_deploy_aaveadapter.ts => 001_deploy_aaveadapter.ts} (100%) create mode 100644 deploy_mumbai/002_approveandmaptokenshashtotokens_tokens.ts create mode 100644 deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts create mode 100644 deploy_polygon/008_approve_liquidity_pools.ts create mode 100644 deploy_polygon/009_rate_liquidity_pool.ts create mode 100644 deploy_polygon/010_deploy_opUSDCgrow_proxy.ts create mode 100644 deploy_polygon/011_deploy_opUSDCgrow.ts create mode 100644 deploy_polygon/012_deploy_opWMATICgrow_proxy.ts create mode 100644 deploy_polygon/013_deploy_opWMATICgrow.ts diff --git a/deploy_mumbai/005_deploy_aaveadapter.ts b/deploy_mumbai/001_deploy_aaveadapter.ts similarity index 100% rename from deploy_mumbai/005_deploy_aaveadapter.ts rename to deploy_mumbai/001_deploy_aaveadapter.ts diff --git a/deploy_mumbai/002_approveandmaptokenshashtotokens_tokens.ts b/deploy_mumbai/002_approveandmaptokenshashtotokens_tokens.ts new file mode 100644 index 000000000..fd8496075 --- /dev/null +++ b/deploy_mumbai/002_approveandmaptokenshashtotokens_tokens.ts @@ -0,0 +1,63 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { eEVMNetwork, NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; + +const FORK = process.env.FORK || ""; + +const func: DeployFunction = async ({ deployments, getChainId, ethers }: HardhatRuntimeEnvironment) => { + let chainId = await getChainId(); + const registryProxyAddress: string = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + chainId = + ["31337", "1337"].includes(chainId) && FORK != "" ? NETWORKS_CHAIN_ID[FORK as eEVMNetwork].toString() : chainId; + const operatorAddress = await registryV2Instance.operator(); + const operatorSigner = await ethers.getSigner(operatorAddress); + + // approve tokens and map to tokens hash + const onlySetTokensHash = []; + const approveTokenAndMapHash = []; + const tokenHashes: string[] = await registryV2Instance.getTokenHashes(); + + const usdcApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address); + + if (usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("only set USDC hash"); + console.log("\n"); + onlySetTokensHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } + + if (!usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("approve USDC and set hash"); + console.log("\n"); + approveTokenAndMapHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } + + if (approveTokenAndMapHash.length > 0) { + console.log("approve token and map hash"); + console.log("\n"); + const approveTokenAndMapToTokensHashTx = await registryV2Instance + .connect(operatorSigner) + ["approveTokenAndMapToTokensHash((bytes32,address[])[])"](approveTokenAndMapHash); + await approveTokenAndMapToTokensHashTx.wait(1); + } + + if (onlySetTokensHash.length > 0) { + console.log("operator mapping only tokenshash to tokens..", onlySetTokensHash); + console.log("\n"); + const onlyMapToTokensHashTx = await registryV2Instance + .connect(operatorSigner) + ["setTokensHashToTokens((bytes32,address[])[])"](onlySetTokensHash); + await onlyMapToTokensHashTx.wait(1); + } +}; +export default func; +func.tags = ["MumbaiApproveTokensAndMapTokensHash"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts b/deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts new file mode 100644 index 000000000..134a98241 --- /dev/null +++ b/deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts @@ -0,0 +1,83 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { eEVMNetwork, NETWORKS_CHAIN_ID } from "../helper-hardhat-config"; + +const FORK = process.env.FORK || ""; + +const func: DeployFunction = async ({ deployments, getChainId, ethers }: HardhatRuntimeEnvironment) => { + let chainId = await getChainId(); + const registryProxyAddress: string = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + chainId = + ["31337", "1337"].includes(chainId) && FORK != "" ? NETWORKS_CHAIN_ID[FORK as eEVMNetwork].toString() : chainId; + const operatorAddress = await registryV2Instance.operator(); + const operatorSigner = await ethers.getSigner(operatorAddress); + + // approve tokens and map to tokens hash + const onlySetTokensHash = []; + const approveTokenAndMapHash = []; + const tokenHashes: string[] = await registryV2Instance.getTokenHashes(); + + const usdcApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address); + + if (usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("only set USDC hash"); + console.log("\n"); + onlySetTokensHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } + + if (!usdcApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash)) { + console.log("approve USDC and set hash"); + console.log("\n"); + approveTokenAndMapHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.address], + ]); + } + + const wmaticApproved = await registryV2Instance.isApprovedToken(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address); + + if (wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { + console.log("only set WMATIC hash"); + console.log("\n"); + onlySetTokensHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], + ]); + } + + if (!wmaticApproved && !tokenHashes.includes(MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash)) { + console.log("approve WMATIC and set hash"); + console.log("\n"); + approveTokenAndMapHash.push([ + MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, + [MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.address], + ]); + } + + if (approveTokenAndMapHash.length > 0) { + console.log("approve token and map hash"); + console.log("\n"); + const approveTokenAndMapToTokensHashTx = await registryV2Instance + .connect(operatorSigner) + ["approveTokenAndMapToTokensHash((bytes32,address[])[])"](approveTokenAndMapHash); + await approveTokenAndMapToTokensHashTx.wait(1); + } + + if (onlySetTokensHash.length > 0) { + console.log("operator mapping only tokenshash to tokens..", onlySetTokensHash); + console.log("\n"); + const onlyMapToTokensHashTx = await registryV2Instance + .connect(operatorSigner) + ["setTokensHashToTokens((bytes32,address[])[])"](onlySetTokensHash); + await onlyMapToTokensHashTx.wait(1); + } +}; +export default func; +func.tags = ["PolygonApproveTokensAndMapTokensHash"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/008_approve_liquidity_pools.ts b/deploy_polygon/008_approve_liquidity_pools.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/009_rate_liquidity_pool.ts b/deploy_polygon/009_rate_liquidity_pool.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/010_deploy_opUSDCgrow_proxy.ts b/deploy_polygon/010_deploy_opUSDCgrow_proxy.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/011_deploy_opUSDCgrow.ts b/deploy_polygon/011_deploy_opUSDCgrow.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/012_deploy_opWMATICgrow_proxy.ts b/deploy_polygon/012_deploy_opWMATICgrow_proxy.ts new file mode 100644 index 000000000..e69de29bb diff --git a/deploy_polygon/013_deploy_opWMATICgrow.ts b/deploy_polygon/013_deploy_opWMATICgrow.ts new file mode 100644 index 000000000..e69de29bb diff --git a/helpers/constants/tokens.ts b/helpers/constants/tokens.ts index 76cccae67..5579114cb 100644 --- a/helpers/constants/tokens.ts +++ b/helpers/constants/tokens.ts @@ -146,6 +146,17 @@ const kovanTokens = { }, }; +const mumbaiTokens = { + USDC: { + address: "0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e", + pair: false, + hash: generateTokenHashV2( + ["0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e"], + NETWORKS_CHAIN_ID_HEX[eEVMNetwork.mumbai], + ), + }, +}; + export const MULTI_CHAIN_VAULT_TOKENS: MULTI_CHAIN_TOKENS_DATA = { [eEVMNetwork.mainnet]: ethereumTokens, [NETWORKS_CHAIN_ID[eEVMNetwork.mainnet]]: ethereumTokens, @@ -153,6 +164,9 @@ export const MULTI_CHAIN_VAULT_TOKENS: MULTI_CHAIN_TOKENS_DATA = { [eEVMNetwork.polygon]: polygonTokens, [NETWORKS_CHAIN_ID[eEVMNetwork.polygon]]: polygonTokens, [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]]: polygonTokens, + [eEVMNetwork.mumbai]: mumbaiTokens, + [NETWORKS_CHAIN_ID[eEVMNetwork.mumbai]]: mumbaiTokens, + [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.mumbai]]: mumbaiTokens, [eEVMNetwork.kovan]: kovanTokens, [NETWORKS_CHAIN_ID[eEVMNetwork.kovan]]: kovanTokens, [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.kovan]]: kovanTokens, From 827b9ef492f1c0fa58e56eaa562d7584ee4b43dc Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Tue, 29 Mar 2022 00:20:23 -0400 Subject: [PATCH 18/52] refactor(lint): fix --- .eslintignore | 2 ++ .prettierignore | 7 ++++++- .solhintignore | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.eslintignore b/.eslintignore index b9024c10e..107154455 100644 --- a/.eslintignore +++ b/.eslintignore @@ -16,5 +16,7 @@ contracts/protocol/curve-metapool-deposit-adapter contracts/protocol/curve-metapool-gauge-adapter contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter +contracts/protocol/aave-polygon-adapter +contracts/protocol/sushiswap-farm-polygon # files .solcover.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index a104fa1cf..b53b4494c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -14,7 +14,12 @@ contracts/protocol/team-defi-adapters contracts/protocol/earn-protocol-configuration contracts/protocol/defi-adapters -contracts/protocol/*-adapter +contracts/protocol/curve-metapool-deposit-adapter +contracts/protocol/curve-metapool-gauge-adapter +contracts/protocol/curve-metapool-swap-adapter +contracts/protocol/curve-polygon-adapter +contracts/protocol/aave-polygon-adapter +contracts/protocol/sushiswap-farm-polygon # files *.env diff --git a/.solhintignore b/.solhintignore index 937c030b2..100d6ddb3 100644 --- a/.solhintignore +++ b/.solhintignore @@ -9,4 +9,9 @@ contracts/mocks/ contracts/protocol/team-defi-adapters contracts/protocol/earn-protocol-configuration contracts/protocol/defi-adapters -contracts/protocol/*-adapter \ No newline at end of file +contracts/protocol/curve-metapool-deposit-adapter +contracts/protocol/curve-metapool-gauge-adapter +contracts/protocol/curve-metapool-swap-adapter +contracts/protocol/curve-polygon-adapter +contracts/protocol/aave-polygon-adapter +contracts/protocol/sushiswap-farm-polygon \ No newline at end of file From 56c41c4ce72cb25b60bbc1b5333da99a5849ecdc Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Tue, 29 Mar 2022 13:53:30 -0400 Subject: [PATCH 19/52] feat(deploy): vaults on polygon and mumbai --- deploy_mumbai/003_deploy_opUSDCgrow.ts | 75 +++++++++++++++++++ ...08_approveliquiditypools_maptoadapters.ts} | 0 deploy_polygon/010_deploy_opUSDCgrow.ts | 75 +++++++++++++++++++ deploy_polygon/010_deploy_opUSDCgrow_proxy.ts | 0 deploy_polygon/011_deploy_opUSDCgrow.ts | 0 deploy_polygon/011_deploy_opWMATICgrow.ts | 75 +++++++++++++++++++ .../012_deploy_opWMATICgrow_proxy.ts | 0 deploy_polygon/013_deploy_opWMATICgrow.ts | 0 8 files changed, 225 insertions(+) create mode 100644 deploy_mumbai/003_deploy_opUSDCgrow.ts rename deploy_polygon/{008_approve_liquidity_pools.ts => 008_approveliquiditypools_maptoadapters.ts} (100%) create mode 100644 deploy_polygon/010_deploy_opUSDCgrow.ts delete mode 100644 deploy_polygon/010_deploy_opUSDCgrow_proxy.ts delete mode 100644 deploy_polygon/011_deploy_opUSDCgrow.ts create mode 100644 deploy_polygon/011_deploy_opWMATICgrow.ts delete mode 100644 deploy_polygon/012_deploy_opWMATICgrow_proxy.ts delete mode 100644 deploy_polygon/013_deploy_opWMATICgrow.ts diff --git a/deploy_mumbai/003_deploy_opUSDCgrow.ts b/deploy_mumbai/003_deploy_opUSDCgrow.ts new file mode 100644 index 000000000..a63639c45 --- /dev/null +++ b/deploy_mumbai/003_deploy_opUSDCgrow.ts @@ -0,0 +1,75 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { waitforme } from "../helpers/utils"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getNamedAccounts, + getChainId, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const { deployer, admin } = await getNamedAccounts(); + const artifact = await deployments.getArtifact("Vault"); + const artifactVaultProxyV2 = await deployments.getArtifact("AdminUpgradeabilityProxy"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("opUSDCgrow", { + from: deployer, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + log: true, + skipIfAlreadyDeployed: true, + proxy: { + owner: admin, + upgradeIndex: 0, + proxyContract: { + abi: artifactVaultProxyV2.abi, + bytecode: artifactVaultProxyV2.bytecode, + deployedBytecode: artifactVaultProxyV2.deployedBytecode, + }, + execute: { + init: { + methodName: "initialize", + args: [registryProxyAddress, MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, "USDC Coin (PoS)", "USDC", "1"], + }, + }, + }, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const vault = await deployments.get("opUSDCgrow"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "opUSDCgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "opUSDCgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + }); + } + } + } +}; +export default func; +func.tags = ["MumbaiopUSDCgrow"]; +func.dependencies = ["MumbaiApproveTokensAndMapTokensHash"]; diff --git a/deploy_polygon/008_approve_liquidity_pools.ts b/deploy_polygon/008_approveliquiditypools_maptoadapters.ts similarity index 100% rename from deploy_polygon/008_approve_liquidity_pools.ts rename to deploy_polygon/008_approveliquiditypools_maptoadapters.ts diff --git a/deploy_polygon/010_deploy_opUSDCgrow.ts b/deploy_polygon/010_deploy_opUSDCgrow.ts new file mode 100644 index 000000000..7b071ba68 --- /dev/null +++ b/deploy_polygon/010_deploy_opUSDCgrow.ts @@ -0,0 +1,75 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { waitforme } from "../helpers/utils"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getNamedAccounts, + getChainId, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const { deployer, admin } = await getNamedAccounts(); + const artifact = await deployments.getArtifact("Vault"); + const artifactVaultProxyV2 = await deployments.getArtifact("AdminUpgradeabilityProxy"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("opUSDCgrow", { + from: deployer, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + log: true, + skipIfAlreadyDeployed: true, + proxy: { + owner: admin, + upgradeIndex: 0, + proxyContract: { + abi: artifactVaultProxyV2.abi, + bytecode: artifactVaultProxyV2.bytecode, + deployedBytecode: artifactVaultProxyV2.deployedBytecode, + }, + execute: { + init: { + methodName: "initialize", + args: [registryProxyAddress, MULTI_CHAIN_VAULT_TOKENS[chainId].USDC.hash, "USDC Coin (PoS)", "USDC", "1"], + }, + }, + }, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const vault = await deployments.get("opUSDCgrow"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "opUSDCgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "opUSDCgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "USD Coin (PoS)", "USDC", "Growth", "grow"], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonopUSDCgrow"]; +func.dependencies = ["PolygonApproveTokensAndMapTokensHash"]; diff --git a/deploy_polygon/010_deploy_opUSDCgrow_proxy.ts b/deploy_polygon/010_deploy_opUSDCgrow_proxy.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/deploy_polygon/011_deploy_opUSDCgrow.ts b/deploy_polygon/011_deploy_opUSDCgrow.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/deploy_polygon/011_deploy_opWMATICgrow.ts b/deploy_polygon/011_deploy_opWMATICgrow.ts new file mode 100644 index 000000000..1d9c36bb0 --- /dev/null +++ b/deploy_polygon/011_deploy_opWMATICgrow.ts @@ -0,0 +1,75 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { waitforme } from "../helpers/utils"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getNamedAccounts, + getChainId, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const { deployer, admin } = await getNamedAccounts(); + const artifact = await deployments.getArtifact("Vault"); + const artifactVaultProxyV2 = await deployments.getArtifact("AdminUpgradeabilityProxy"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("opWMATICgrow", { + from: deployer, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress, "Wrapped Matic", "WMATIC", "Growth", "grow"], + log: true, + skipIfAlreadyDeployed: true, + proxy: { + owner: admin, + upgradeIndex: 0, + proxyContract: { + abi: artifactVaultProxyV2.abi, + bytecode: artifactVaultProxyV2.bytecode, + deployedBytecode: artifactVaultProxyV2.deployedBytecode, + }, + execute: { + init: { + methodName: "initialize", + args: [registryProxyAddress, MULTI_CHAIN_VAULT_TOKENS[chainId].WMATIC.hash, "Wrapped Matic", "WMATIC", "1"], + }, + }, + }, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const vault = await deployments.get("opWMATICgrow"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "opWMATICgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "Wrapped Matic", "WMATIC", "Growth", "grow"], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "opWMATICgrow", + address: vault.address, + constructorArguments: [registryProxyAddress, "Wrapped Matic", "WMATIC", "Growth", "grow"], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonopWMATICgrow"]; +func.dependencies = ["PolygonApproveTokensAndMapTokensHash"]; diff --git a/deploy_polygon/012_deploy_opWMATICgrow_proxy.ts b/deploy_polygon/012_deploy_opWMATICgrow_proxy.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/deploy_polygon/013_deploy_opWMATICgrow.ts b/deploy_polygon/013_deploy_opWMATICgrow.ts deleted file mode 100644 index e69de29bb..000000000 From 2358a72f8c591f3bb5f004cd2745c2a443d2352d Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Tue, 29 Mar 2022 14:08:21 -0400 Subject: [PATCH 20/52] chore(strategy): create strategy shell --- helpers/data/adapter-with-strategies.ts | 408 +++++++++++++----------- 1 file changed, 219 insertions(+), 189 deletions(-) diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index f3c5de2f2..8e5cd4500 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -16,7 +16,7 @@ import { SUSHISWAP_ADAPTER_NAME, CONVEX_ADAPTER_NAME, } from "../constants/adapters"; -import { eEVMNetwork, NETWORKS_CHAIN_ID } from "../../helper-hardhat-config"; +import { eEVMNetwork, NETWORKS_CHAIN_ID, NETWORKS_CHAIN_ID_HEX } from "../../helper-hardhat-config"; export const TypedAdapterStrategies: ADAPTER_WITH_STRATEGIES_DATA = { [CONVEX_ADAPTER_NAME]: [ @@ -198,197 +198,227 @@ export const TypedAdapterStrategies: ADAPTER_WITH_STRATEGIES_DATA = { ], }; -export const StrategiesByTokenByChain: StrategiesByTokenByChainType = { - [eEVMNetwork.mainnet || NETWORKS_CHAIN_ID[eEVMNetwork.mainnet]]: { - USDC: { - "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveMetapoolSwapPool-FRAX3CRV-f-DEPOSIT-Convex-cvxFRAX3CRV-f": { - strategyName: - "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveMetapoolSwapPool-FRAX3CRV-f-DEPOSIT-Convex-cvxFRAX3CRV-f", - token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - strategy: [ - { - contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", - outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", - isBorrow: false, - outputTokenSymbol: "3Crv", - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - }, - { - contract: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B", - outputToken: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B", - isBorrow: false, - outputTokenSymbol: "FRAX3CRV-f", - adapterName: "CurveMetapoolSwapAdapter", - protocol: "Curve", - }, - { - contract: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA", - outputToken: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA", - isBorrow: false, - outputTokenSymbol: "cvxFRAX3CRV-f", - adapterName: "ConvexFinanceAdapter", - protocol: "Convex", - }, - ], - }, - "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveSwapPool-MIM-3LP3CRV-f-DEPOSIT-Convex-cvxMIM-3LP3CRV-f": { - strategyName: - "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveSwapPool-MIM-3LP3CRV-f-DEPOSIT-Convex-cvxMIM-3LP3CRV-f", - token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - strategy: [ - { - contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", - outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", - isBorrow: false, - outputTokenSymbol: "3Crv", - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - }, - { - contract: "0x5a6A4D54456819380173272A5E8E9B9904BdF41B", - outputToken: "0x5a6A4D54456819380173272A5E8E9B9904BdF41B", - isBorrow: false, - outputTokenSymbol: "MIM-3LP3CRV-f", - adapterName: "CurveMetapoolSwapAdapter", - protocol: "Curve", - }, - { - contract: "0xabB54222c2b77158CC975a2b715a3d703c256F05", - outputToken: "0xabB54222c2b77158CC975a2b715a3d703c256F05", - isBorrow: false, - outputTokenSymbol: "cvxMIM-3LP3CRV-f", - adapterName: "ConvexFinanceAdapter", - protocol: "Convex", - }, - ], - }, - "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_USDN-3Crv-DEPOSIT-Convex_CurveUsdn-3Crv": { - strategyName: "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_USDN-3Crv-DEPOSIT-Convex_CurveUsdn-3Crv", - token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - strategy: [ - { - contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", - outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", - isBorrow: false, - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - outputTokenSymbol: "3Crv", - }, - { - contract: "0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1", - outputToken: "0x4f3E8F405CF5aFC05D68142F3783bDfE13811522", - isBorrow: false, - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - outputTokenSymbol: "usdn3Crv", - }, - { - contract: "0x3689f325E88c2363274E5F3d44b6DaB8f9e1f524", - outputToken: "0x3689f325E88c2363274E5F3d44b6DaB8f9e1f524", - isBorrow: false, - adapterName: "ConvexFinanceAdapter", - protocol: "Convex", - outputTokenSymbol: "cvxusdn3CRV", - }, - ], - }, - "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_UST-3Crv-DEPOSIT-Convex_CurveUst-3Crv": { - strategyName: "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_UST-3Crv-DEPOSIT-Convex_CurveUst-3Crv", - token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - strategy: [ - { - contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", - outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", - isBorrow: false, - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - outputTokenSymbol: "3Crv", - }, - { - contract: "0x890f4e345B1dAED0367A877a1612f86A1f86985f", - outputToken: "0x94e131324b6054c0D789b190b2dAC504e4361b53", - isBorrow: false, - adapterName: "CurveSwapPool", - protocol: "Curve", - outputTokenSymbol: "ust3Crv", - }, - { - contract: "0x67c4f788FEB82FAb27E3007daa3d7b90959D5b89", - outputToken: "0x67c4f788FEB82FAb27E3007daa3d7b90959D5b89", - isBorrow: false, - adapterName: "ConvexFinanceAdapter", - protocol: "Convex", - outputTokenSymbol: "cvxust3CRV", - }, - ], - }, +const mainnetStrategiesByToken = { + USDC: { + "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveMetapoolSwapPool-FRAX3CRV-f-DEPOSIT-Convex-cvxFRAX3CRV-f": { + strategyName: + "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveMetapoolSwapPool-FRAX3CRV-f-DEPOSIT-Convex-cvxFRAX3CRV-f", + token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + strategy: [ + { + contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", + outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", + isBorrow: false, + outputTokenSymbol: "3Crv", + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + }, + { + contract: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B", + outputToken: "0xd632f22692FaC7611d2AA1C0D552930D43CAEd3B", + isBorrow: false, + outputTokenSymbol: "FRAX3CRV-f", + adapterName: "CurveMetapoolSwapAdapter", + protocol: "Curve", + }, + { + contract: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA", + outputToken: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA", + isBorrow: false, + outputTokenSymbol: "cvxFRAX3CRV-f", + adapterName: "ConvexFinanceAdapter", + protocol: "Convex", + }, + ], + }, + "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveSwapPool-MIM-3LP3CRV-f-DEPOSIT-Convex-cvxMIM-3LP3CRV-f": { + strategyName: + "usdc-DEPOSIT-CurveSwapPool-3Crv-DEPOSIT-CurveSwapPool-MIM-3LP3CRV-f-DEPOSIT-Convex-cvxMIM-3LP3CRV-f", + token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + strategy: [ + { + contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", + outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", + isBorrow: false, + outputTokenSymbol: "3Crv", + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + }, + { + contract: "0x5a6A4D54456819380173272A5E8E9B9904BdF41B", + outputToken: "0x5a6A4D54456819380173272A5E8E9B9904BdF41B", + isBorrow: false, + outputTokenSymbol: "MIM-3LP3CRV-f", + adapterName: "CurveMetapoolSwapAdapter", + protocol: "Curve", + }, + { + contract: "0xabB54222c2b77158CC975a2b715a3d703c256F05", + outputToken: "0xabB54222c2b77158CC975a2b715a3d703c256F05", + isBorrow: false, + outputTokenSymbol: "cvxMIM-3LP3CRV-f", + adapterName: "ConvexFinanceAdapter", + protocol: "Convex", + }, + ], + }, + "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_USDN-3Crv-DEPOSIT-Convex_CurveUsdn-3Crv": { + strategyName: "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_USDN-3Crv-DEPOSIT-Convex_CurveUsdn-3Crv", + token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + strategy: [ + { + contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", + outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", + isBorrow: false, + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + outputTokenSymbol: "3Crv", + }, + { + contract: "0x0f9cb53Ebe405d49A0bbdBD291A65Ff571bC83e1", + outputToken: "0x4f3E8F405CF5aFC05D68142F3783bDfE13811522", + isBorrow: false, + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + outputTokenSymbol: "usdn3Crv", + }, + { + contract: "0x3689f325E88c2363274E5F3d44b6DaB8f9e1f524", + outputToken: "0x3689f325E88c2363274E5F3d44b6DaB8f9e1f524", + isBorrow: false, + adapterName: "ConvexFinanceAdapter", + protocol: "Convex", + outputTokenSymbol: "cvxusdn3CRV", + }, + ], }, - WETH: { - "weth-DEPOSIT-Lido-stETH-DEPOSIT-CurveSwapPool-steCRV-DEPOSIT-Convex-cvxsteCRV": { - strategyName: "weth-DEPOSIT-Lido-stETH-DEPOSIT-CurveSwapPool-steCRV-DEPOSIT-Convex-cvxsteCRV", - token: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - strategy: [ - { - contract: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", - outputToken: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", - isBorrow: false, - outputTokenSymbol: "stETH", - adapterName: "LidoAdapter", - protocol: "Lido", - }, - { - contract: "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", - outputToken: "0x06325440D014e39736583c165C2963BA99fAf14E", - isBorrow: false, - outputTokenSymbol: "steCRV", - adapterName: "CurveSwapPoolAdapter", - protocol: "Curve", - }, - { - contract: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0", - outputToken: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0", - isBorrow: false, - outputTokenSymbol: "cvxsteCRV", - adapterName: "ConvexFinanceAdapter", - protocol: "Convex", - }, - ], - }, + "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_UST-3Crv-DEPOSIT-Convex_CurveUst-3Crv": { + strategyName: "USDC-DEPOSIT-Curve_3Crv-DEPOSIT-Curve_UST-3Crv-DEPOSIT-Convex_CurveUst-3Crv", + token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + strategy: [ + { + contract: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", + outputToken: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", + isBorrow: false, + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + outputTokenSymbol: "3Crv", + }, + { + contract: "0x890f4e345B1dAED0367A877a1612f86A1f86985f", + outputToken: "0x94e131324b6054c0D789b190b2dAC504e4361b53", + isBorrow: false, + adapterName: "CurveSwapPool", + protocol: "Curve", + outputTokenSymbol: "ust3Crv", + }, + { + contract: "0x67c4f788FEB82FAb27E3007daa3d7b90959D5b89", + outputToken: "0x67c4f788FEB82FAb27E3007daa3d7b90959D5b89", + isBorrow: false, + adapterName: "ConvexFinanceAdapter", + protocol: "Convex", + outputTokenSymbol: "cvxust3CRV", + }, + ], }, }, - [eEVMNetwork.polygon || NETWORKS_CHAIN_ID[eEVMNetwork.polygon]]: {}, - [eEVMNetwork.avalanche || NETWORKS_CHAIN_ID[eEVMNetwork.avalanche]]: {}, - [eEVMNetwork.kovan || NETWORKS_CHAIN_ID[eEVMNetwork.kovan]]: { - USDC: { - "usdc-DEPOSIT-AaveV1-aUSDC": { - strategyName: "usdc-DEPOSIT-AaveV1-aUSDC", - token: "0xe22da380ee6b445bb8273c81944adeb6e8450422", - strategy: [ - { - contract: "0x506B0B2CF20FAA8f38a4E2B524EE43e1f4458Cc5", - outputToken: "0x02F626c6ccb6D2ebC071c068DC1f02Bf5693416a", - isBorrow: false, - outputTokenSymbol: "aUSDC", - adapterName: "AaveV1Adapter", - protocol: "Aave", - }, - ], - }, - "usdc-DEPOSIT-AaveV2-aUSDC": { - strategyName: "usdc-DEPOSIT-AaveV2-aUSDC", - token: "0xe22da380ee6b445bb8273c81944adeb6e8450422", - strategy: [ - { - contract: "0x1E40B561EC587036f9789aF83236f057D1ed2A90", - outputToken: "0xe12AFeC5aa12Cf614678f9bFeeB98cA9Bb95b5B0", - isBorrow: false, - outputTokenSymbol: "aUSDC", - adapterName: "AaveV2Adapter", - protocol: "Aave", - }, - ], - }, + WETH: { + "weth-DEPOSIT-Lido-stETH-DEPOSIT-CurveSwapPool-steCRV-DEPOSIT-Convex-cvxsteCRV": { + strategyName: "weth-DEPOSIT-Lido-stETH-DEPOSIT-CurveSwapPool-steCRV-DEPOSIT-Convex-cvxsteCRV", + token: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + strategy: [ + { + contract: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + outputToken: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + isBorrow: false, + outputTokenSymbol: "stETH", + adapterName: "LidoAdapter", + protocol: "Lido", + }, + { + contract: "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", + outputToken: "0x06325440D014e39736583c165C2963BA99fAf14E", + isBorrow: false, + outputTokenSymbol: "steCRV", + adapterName: "CurveSwapPoolAdapter", + protocol: "Curve", + }, + { + contract: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0", + outputToken: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0", + isBorrow: false, + outputTokenSymbol: "cvxsteCRV", + adapterName: "ConvexFinanceAdapter", + protocol: "Convex", + }, + ], + }, + }, +}; + +const kovanStrategiesByToken = { + USDC: { + "usdc-DEPOSIT-AaveV1-aUSDC": { + strategyName: "usdc-DEPOSIT-AaveV1-aUSDC", + token: "0xe22da380ee6b445bb8273c81944adeb6e8450422", + strategy: [ + { + contract: "0x506B0B2CF20FAA8f38a4E2B524EE43e1f4458Cc5", + outputToken: "0x02F626c6ccb6D2ebC071c068DC1f02Bf5693416a", + isBorrow: false, + outputTokenSymbol: "aUSDC", + adapterName: "AaveV1Adapter", + protocol: "Aave", + }, + ], + }, + "usdc-DEPOSIT-AaveV2-aUSDC": { + strategyName: "usdc-DEPOSIT-AaveV2-aUSDC", + token: "0xe22da380ee6b445bb8273c81944adeb6e8450422", + strategy: [ + { + contract: "0x1E40B561EC587036f9789aF83236f057D1ed2A90", + outputToken: "0xe12AFeC5aa12Cf614678f9bFeeB98cA9Bb95b5B0", + isBorrow: false, + outputTokenSymbol: "aUSDC", + adapterName: "AaveV2Adapter", + protocol: "Aave", + }, + ], }, }, }; + +const polygonStrategiesbyToken = { + USDC: { + // USDC -> curve/aave3crv -> Beefy + // USDC -> sushi/usdc-usdt -> Beefy + // USDC -> sushi/usdc-dai -> Beefy + // USDC -> aave + }, + WMATIC: { + // WMATIC -> aave + }, +}; + +const mumbaiStrategiesbyToken = { + USDC: { + // USDC -> aave + }, +}; + +export const StrategiesByTokenByChain: StrategiesByTokenByChainType = { + [eEVMNetwork.mainnet]: mainnetStrategiesByToken, + [NETWORKS_CHAIN_ID[eEVMNetwork.mainnet]]: mainnetStrategiesByToken, + [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.mainnet]]: mainnetStrategiesByToken, + [eEVMNetwork.kovan]: kovanStrategiesByToken, + [NETWORKS_CHAIN_ID[eEVMNetwork.kovan]]: kovanStrategiesByToken, + [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.kovan]]: kovanStrategiesByToken, + [eEVMNetwork.polygon]: polygonStrategiesbyToken, + [NETWORKS_CHAIN_ID[eEVMNetwork.polygon]]: polygonStrategiesbyToken, + [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.polygon]]: polygonStrategiesbyToken, + [eEVMNetwork.mumbai]: mumbaiStrategiesbyToken, + [NETWORKS_CHAIN_ID[eEVMNetwork.mumbai]]: mumbaiStrategiesbyToken, + [NETWORKS_CHAIN_ID_HEX[eEVMNetwork.mumbai]]: mumbaiStrategiesbyToken, +}; From ef65e6732202d1e6cc5c04150714cde34e347364 Mon Sep 17 00:00:00 2001 From: leodinh Date: Tue, 29 Mar 2022 23:39:16 -0400 Subject: [PATCH 21/52] feat: initilized testing structure --- helpers/data/adapter-with-strategies.ts | 30 ++++++- test/test-opty/4_vaultv2_strategies.spec.ts | 97 ++++++++++++++++----- 2 files changed, 105 insertions(+), 22 deletions(-) diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 8e5cd4500..92f32f062 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -395,10 +395,38 @@ const polygonStrategiesbyToken = { // USDC -> curve/aave3crv -> Beefy // USDC -> sushi/usdc-usdt -> Beefy // USDC -> sushi/usdc-dai -> Beefy - // USDC -> aave + // USDC -> aave, + + "usdc-DEPOSIT-Aave-aUSDC": { + strategyName: "usdc-DEPOSIT-Aave-aUSDC", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "0x3ac4e9aa29940770aeC38fe853a4bbabb2dA9C19", + outputToken: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", + isBorrow: false, + outputTokenSymbol: "aUSDC", + adapterName: "AaveAdapter", + protocol: "Aave", + }, + ], + }, }, WMATIC: { // WMATIC -> aave + "wmatic-DEPOSIT-Aave-awmatic": { + strategyName: "wmatic-DEPOSIT-Aave-awmatic", + token: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + strategy: [ + { + contract: "0x3ac4e9aa29940770aeC38fe853a4bbabb2dA9C19", + outputToken: "0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4", + isBorrow: false, + adapterName: "AaveAdapter", + protocol: "Aave", + }, + ], + }, }, }; diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index 1345ed098..bb53bd2cd 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -1,12 +1,13 @@ -import chai from "chai"; -import { deployments, ethers } from "hardhat"; +import chai, { expect } from "chai"; +import { deployments, ethers, network } from "hardhat"; import { solidity } from "ethereum-waffle"; import { Signers } from "../../helpers/utils"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signers"; import { StrategiesByTokenByChain } from "../../helpers/data/adapter-with-strategies"; -import { eEVMNetwork } from "../../helper-hardhat-config"; - -import { RegistryV2, RiskManagerV2, StrategyProviderV2 } from "../../typechain"; +import { eEVMNetwork, NETWORKS_CHAIN_ID_HEX } from "../../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { Registry, RiskManager, StrategyProvider, Vault } from "../../typechain"; +import { generateTokenHashV2, generateStrategyHashV2 } from "../../helpers/helpers"; chai.use(solidity); @@ -28,27 +29,81 @@ describe("VaultV2", () => { this.signers.strategyOperator = signers[7]; const registryProxy = await deployments.get("RegistryProxy"); const riskManagerProxy = await deployments.get("RiskManagerProxy"); - const strategyProviderV2 = await deployments.get("StrategyProviderV2"); - this.registryV2 = await ethers.getContractAt("RegistryV2", registryProxy.address); - this.riskManagerV2 = await ethers.getContractAt("RiskManagerV2", riskManagerProxy.address); - this.strategyProviderV2 = ( - await ethers.getContractAt("StrategyProviderV2", strategyProviderV2.address) + const strategyProvider = await deployments.get("StrategyProvider"); + const opUSDCGrow = await deployments.get("opUSDCgrow"); + const opWMATICGrow = await deployments.get("opWMATICgrow"); + this.registry = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxy.address); + this.riskManager = ( + await ethers.getContractAt(ESSENTIAL_CONTRACTS.RISK_MANAGER, riskManagerProxy.address) + ); + this.strategyProvider = ( + await ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, strategyProvider.address) + ); + this.vaults = {}; + this.vaults["USDC"] = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opUSDCGrow.address); + if (fork === eEVMNetwork.polygon) { + this.vaults["WMATIC"] = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWMATICGrow.address); + } + const governanceAddress = await this.registry.getGovernance(); + await network.provider.request({ + method: "hardhat_impersonateAccount", + params: [governanceAddress], + }); + const governance = await ethers.getSigner(governanceAddress); + const expectedConfig = ethers.BigNumber.from( + "2715643938564376714569528258641865758826842749497826340477583138757711757312", ); + const _vaultUSDCConfiguration = await this.vaults["USDC"].vaultConfiguration(); + if (expectedConfig.eq(_vaultUSDCConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + const tx2 = await this.vaults["USDC"].connect(governance).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } + const _vaultWMATICConfiguration = await this.vaults["WMATIC"].vaultConfiguration(); + if (expectedConfig.eq(_vaultWMATICConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + const tx2 = await this.vaults["WMATIC"].connect(governance).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } }); - describe.only("VaultV2 strategies", () => { - // before(async function () { - // console.log("rmv2 ", this.riskManagerV2.address); - // }); - // for (let i = 0; i < 1; i++) { - // it(`strategy${i}`, async function () { - // console.log("fn1"); - // }); - // } + describe("VaultV2 strategies", () => { for (const token of Object.keys(StrategiesByTokenByChain[fork])) { for (const strategy of Object.keys(StrategiesByTokenByChain[fork][token])) { + const strategyDetail = StrategiesByTokenByChain[fork][token][strategy]; + const tokenHash = generateTokenHashV2([strategyDetail.token], NETWORKS_CHAIN_ID_HEX[fork]); + const strategyHash = generateStrategyHashV2(strategyDetail.strategy, tokenHash); + before(async function () { + const approveLqPoolList = []; + for (let i = 0; i < strategyDetail.strategy.length; i++) { + const pool = strategyDetail.strategy[i]; + if (pool.adapterName) { + approveLqPoolList.push([pool.contract, (await deployments.get(pool.adapterName)).address]); + } + } + if (approveLqPoolList.length > 0) { + await (this.registry as any)["approveLiquidityPoolAndMapToAdapter((address,address)[])"](approveLqPoolList); + } + await (this.strategyProvider as any).setBestStrategy( + 1, + tokenHash, + strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), + ); + }); describe(`${strategy}`, () => { - it("should deposit withdraw", async function () { - console.log("-"); + it("should receive new strategy after rebalancing", async function () { + await this.vaults[token].rebalance(); + expect(await this.vaults[token].getInvestStrategySteps()).to.deep.eq( + strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), + ); + expect(await this.vaults[token].investStrategyHash()).to.eq(strategyHash); }); }); } From 62082eb5732367ccd0402be37def37f69e86171d Mon Sep 17 00:00:00 2001 From: leodinh Date: Wed, 30 Mar 2022 16:41:44 -0400 Subject: [PATCH 22/52] feat: finished aave polygon integration testing --- helpers/constants/essential-contracts-name.ts | 1 + test/test-opty/4_vaultv2_strategies.spec.ts | 181 +++++++++++++++--- 2 files changed, 156 insertions(+), 26 deletions(-) diff --git a/helpers/constants/essential-contracts-name.ts b/helpers/constants/essential-contracts-name.ts index 658dabf55..0a7118b9e 100644 --- a/helpers/constants/essential-contracts-name.ts +++ b/helpers/constants/essential-contracts-name.ts @@ -13,4 +13,5 @@ export const ESSENTIAL_CONTRACTS: DATA_OBJECT = { RISK_MANAGER_PROXY: "contracts/protocol/earn-protocol-configuration/contracts/RiskManagerProxy.sol:RiskManagerProxy", ODEFI_VAULT_BOOSTER: "ODEFIVaultBooster", ERC20: "@openzeppelin/contracts-0.8.x/token/ERC20/ERC20.sol:ERC20", + ADAPTER: "IAdapterFull", }; diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index bb53bd2cd..6f3b7eb38 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -1,13 +1,16 @@ import chai, { expect } from "chai"; import { deployments, ethers, network } from "hardhat"; import { solidity } from "ethereum-waffle"; -import { Signers } from "../../helpers/utils"; +import { Signers, to_10powNumber_BN } from "../../helpers/utils"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signers"; import { StrategiesByTokenByChain } from "../../helpers/data/adapter-with-strategies"; import { eEVMNetwork, NETWORKS_CHAIN_ID_HEX } from "../../helper-hardhat-config"; import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; -import { Registry, RiskManager, StrategyProvider, Vault } from "../../typechain"; +import { Registry, RiskManager, StrategyProvider, Vault, ERC20, IAdapterFull } from "../../typechain"; import { generateTokenHashV2, generateStrategyHashV2 } from "../../helpers/helpers"; +import { setTokenBalanceInStorage } from "./utils"; +import BN from "bignumber.js"; +import { BigNumber } from "ethers"; chai.use(solidity); @@ -44,14 +47,22 @@ describe("VaultV2", () => { if (fork === eEVMNetwork.polygon) { this.vaults["WMATIC"] = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWMATICGrow.address); } + + //TODO Remove if config opVaultGrow development script is done. const governanceAddress = await this.registry.getGovernance(); await network.provider.request({ method: "hardhat_impersonateAccount", params: [governanceAddress], }); const governance = await ethers.getSigner(governanceAddress); + const financeOperatorAddress = await this.registry.getFinanceOperator(); + await network.provider.request({ + method: "hardhat_impersonateAccount", + params: [financeOperatorAddress], + }); + const financeOperator = await ethers.getSigner(financeOperatorAddress); const expectedConfig = ethers.BigNumber.from( - "2715643938564376714569528258641865758826842749497826340477583138757711757312", + "906392544231311161076231617881117198619499239097192527361058388634069106688", ); const _vaultUSDCConfiguration = await this.vaults["USDC"].vaultConfiguration(); if (expectedConfig.eq(_vaultUSDCConfiguration)) { @@ -63,15 +74,77 @@ describe("VaultV2", () => { const tx2 = await this.vaults["USDC"].connect(governance).setVaultConfiguration(expectedConfig); await tx2.wait(1); } - const _vaultWMATICConfiguration = await this.vaults["WMATIC"].vaultConfiguration(); - if (expectedConfig.eq(_vaultWMATICConfiguration)) { - console.log("vaultConfiguration is as expected"); + + const actualUSDCUserDepositCapUT = await this.vaults["USDC"].userDepositCapUT(); + const actualUSDCMinimumDepositValueUT = await this.vaults["USDC"].minimumDepositValueUT(); + const actualUSDCTotalValueLockedLimitUT = await this.vaults["USDC"].totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC + const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 + + console.log("opUSDCgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUSDCUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualUSDCMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualUSDCTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); console.log("\n"); } else { - console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); console.log("\n"); - const tx2 = await this.vaults["WMATIC"].connect(governance).setVaultConfiguration(expectedConfig); - await tx2.wait(1); + const tx4 = await this.vaults["USDC"] + .connect(financeOperator) + .setValueControlParams( + expectedUserDepositCapUT, + expectedMinimumDepositValueUT, + expectedTotalValueLockedLimitUT, + ); + await tx4.wait(1); + } + if (this.vaults["WMATIC"]) { + const _vaultWMATICConfiguration = await this.vaults["WMATIC"].vaultConfiguration(); + if (expectedConfig.eq(_vaultWMATICConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + const tx2 = await this.vaults["WMATIC"].connect(governance).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } + + const actualUserDepositCapUT = await this.vaults["WMATIC"].userDepositCapUT(); + const actualMinimumDepositValueUT = await this.vaults["WMATIC"].minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await this.vaults["WMATIC"].totalValueLockedLimitUT(); + + const expectedUserDepositCapUT = BigNumber.from("5000000000000000000"); // 5 WETH user deposit cap + const expectedMinimumDepositValueUT = BigNumber.from("250000000000000000"); // 0.25 WETH minimum deposit + const expectedTotalValueLockedLimitUT = BigNumber.from("5000000000000000000000"); // 5000 WETH TVL limit + + console.log("opWETHgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWETHgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWETHgrow..."); + console.log("\n"); + const tx3 = await this.vaults["WMATIC"] + .connect(financeOperator) + .setValueControlParams( + expectedUserDepositCapUT, + expectedMinimumDepositValueUT, + expectedTotalValueLockedLimitUT, + ); + await tx3.wait(1); + } } }); describe("VaultV2 strategies", () => { @@ -80,24 +153,34 @@ describe("VaultV2", () => { const strategyDetail = StrategiesByTokenByChain[fork][token][strategy]; const tokenHash = generateTokenHashV2([strategyDetail.token], NETWORKS_CHAIN_ID_HEX[fork]); const strategyHash = generateStrategyHashV2(strategyDetail.strategy, tokenHash); - before(async function () { - const approveLqPoolList = []; - for (let i = 0; i < strategyDetail.strategy.length; i++) { - const pool = strategyDetail.strategy[i]; - if (pool.adapterName) { - approveLqPoolList.push([pool.contract, (await deployments.get(pool.adapterName)).address]); - } - } - if (approveLqPoolList.length > 0) { - await (this.registry as any)["approveLiquidityPoolAndMapToAdapter((address,address)[])"](approveLqPoolList); - } - await (this.strategyProvider as any).setBestStrategy( - 1, - tokenHash, - strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), - ); - }); + const lastPool = strategyDetail.strategy[strategyDetail.strategy.length - 1].contract; describe(`${strategy}`, () => { + before(async function () { + const approveLqPoolList = []; + for (let i = 0; i < strategyDetail.strategy.length; i++) { + const pool = strategyDetail.strategy[i]; + if (pool.adapterName) { + approveLqPoolList.push([pool.contract, (await deployments.get(pool.adapterName)).address]); + } + } + if (approveLqPoolList.length > 0) { + await (this.registry as any)["approveLiquidityPoolAndMapToAdapter((address,address)[])"]( + approveLqPoolList, + ); + } + await (this.strategyProvider as any).setBestStrategy( + 1, + tokenHash, + strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), + ); + this.token = await ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, strategyDetail.token); + this.adapter = ( + await ethers.getContractAt( + ESSENTIAL_CONTRACTS.ADAPTER, + await this.registry.getLiquidityPoolToAdapter(lastPool), + ) + ); + }); it("should receive new strategy after rebalancing", async function () { await this.vaults[token].rebalance(); expect(await this.vaults[token].getInvestStrategySteps()).to.deep.eq( @@ -105,6 +188,52 @@ describe("VaultV2", () => { ); expect(await this.vaults[token].investStrategyHash()).to.eq(strategyHash); }); + it(`alice deposit.Afterwards, should deposit to strategy successfully`, async function () { + const _userDepositInDecimals = await this.vaults[token].minimumDepositValueUT(); + const _userDeposit = new BN(_userDepositInDecimals.toString()) + .div(new BN(to_10powNumber_BN(await this.vaults[token].decimals()).toString())) + .toString(); + await setTokenBalanceInStorage(this.token, this.signers.alice.address, _userDeposit); + await this.token.connect(this.signers.alice).approve(this.vaults[token].address, _userDepositInDecimals); + const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); + await this.vaults[token].connect(this.signers.alice).userDepositVault(_userDepositInDecimals, [], []); + const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); + expect(userBalanceBefore).gt(userBalanceAfter); + + const vaultBalanceBefore = await this.vaults[token].balanceUT(); + const poolBalanceBefore = await this.adapter.getLiquidityPoolTokenBalance( + this.vaults[token].address, + this.token.address, + strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + ); + await this.vaults[token].connect(this.signers.financeOperator).vaultDepositAllToStrategy(); + const vaultBalanceAfter = await this.vaults[token].balanceUT(); + const poolBalanceAfter = await this.adapter.getLiquidityPoolTokenBalance( + this.vaults[token].address, + this.token.address, + lastPool, + ); + expect(vaultBalanceBefore).gt(vaultBalanceAfter); + expect(poolBalanceBefore).lt(poolBalanceAfter); + }); + it(`alice withdraw. Should withdraw from strategy successfully`, async function () { + const _userDepositInDecimals = await this.vaults[token].minimumDepositValueUT(); + const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); + const poolBalanceBefore = await this.adapter.getLiquidityPoolTokenBalance( + this.vaults[token].address, + this.token.address, + strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + ); + await this.vaults[token].connect(this.signers.alice).userWithdrawVault(_userDepositInDecimals, [], []); + const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); + const poolBalanceAfter = await this.adapter.getLiquidityPoolTokenBalance( + this.vaults[token].address, + this.token.address, + strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + ); + expect(userBalanceBefore).lt(userBalanceAfter); + expect(poolBalanceBefore).gt(poolBalanceAfter); + }); }); } } From 8c2c2eb0c65d5970be16cd144b9a72f063b775ae Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 30 Mar 2022 16:59:53 -0400 Subject: [PATCH 23/52] feat(data): for strategies --- .gitmodules | 6 +- contracts/protocol/aave-polygon-adapter | 2 +- contracts/protocol/defi-adapters | 2 +- contracts/protocol/sushiswap-farm-polygon | 1 - contracts/protocol/sushiswap_pools_adapter | 1 + ....ts => 006_deploy_sushiswappooladapter.ts} | 16 +-- helpers/data/adapter-with-strategies.ts | 132 +++++++++++++++++- 7 files changed, 140 insertions(+), 20 deletions(-) delete mode 160000 contracts/protocol/sushiswap-farm-polygon create mode 160000 contracts/protocol/sushiswap_pools_adapter rename deploy_polygon/{006_deploy_sushiswapfarmadapter.ts => 006_deploy_sushiswappooladapter.ts} (79%) diff --git a/.gitmodules b/.gitmodules index 5663a876f..8e87ef0a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,6 +19,6 @@ [submodule "contracts/protocol/aave-polygon-adapter"] path = contracts/protocol/aave-polygon-adapter url = git@github.com:Opty-Fi/aave-polygon-adapter.git -[submodule "contracts/protocol/sushiswap-farm-polygon"] - path = contracts/protocol/sushiswap-farm-polygon - url = git@github.com:Opty-Fi/sushiswap-farm-polygon.git +[submodule "contracts/protocol/sushiswap_pools_adapter"] + path = contracts/protocol/sushiswap_pools_adapter + url = git@github.com:Opty-Fi/sushiswap_pools_adapter.git diff --git a/contracts/protocol/aave-polygon-adapter b/contracts/protocol/aave-polygon-adapter index 4a8a0c790..78b560b37 160000 --- a/contracts/protocol/aave-polygon-adapter +++ b/contracts/protocol/aave-polygon-adapter @@ -1 +1 @@ -Subproject commit 4a8a0c7906b19164b38faa01b453bf7ca113c67f +Subproject commit 78b560b37d401dd845c5bea496eb8a20b1a096b1 diff --git a/contracts/protocol/defi-adapters b/contracts/protocol/defi-adapters index 86e3e678d..93d8e56ab 160000 --- a/contracts/protocol/defi-adapters +++ b/contracts/protocol/defi-adapters @@ -1 +1 @@ -Subproject commit 86e3e678d3da06a0ba426c25fe9c48f52e465609 +Subproject commit 93d8e56ab2c691eb8dd74fd82bbc2338011fc1d5 diff --git a/contracts/protocol/sushiswap-farm-polygon b/contracts/protocol/sushiswap-farm-polygon deleted file mode 160000 index 4cf963f6b..000000000 --- a/contracts/protocol/sushiswap-farm-polygon +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4cf963f6b984efd642a997226afe1e9abbae056d diff --git a/contracts/protocol/sushiswap_pools_adapter b/contracts/protocol/sushiswap_pools_adapter new file mode 160000 index 000000000..22a0dc4b4 --- /dev/null +++ b/contracts/protocol/sushiswap_pools_adapter @@ -0,0 +1 @@ +Subproject commit 22a0dc4b4ad77bc092ee4f28ee61d0f1a1dea8cb diff --git a/deploy_polygon/006_deploy_sushiswapfarmadapter.ts b/deploy_polygon/006_deploy_sushiswappooladapter.ts similarity index 79% rename from deploy_polygon/006_deploy_sushiswapfarmadapter.ts rename to deploy_polygon/006_deploy_sushiswappooladapter.ts index 27310b1b7..7380a90e2 100644 --- a/deploy_polygon/006_deploy_sushiswapfarmadapter.ts +++ b/deploy_polygon/006_deploy_sushiswappooladapter.ts @@ -15,14 +15,14 @@ const func: DeployFunction = async ({ run, }: HardhatRuntimeEnvironment) => { const { deploy } = deployments; - const artifact = await deployments.getArtifact("SushiswapFarmAdapter"); + const artifact = await deployments.getArtifact("SushiswapPoolAdapter"); const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); const operatorAddress = await registryV2Instance.getOperator(); const chainId = await getChainId(); const networkName = network.name; - const result = await deploy("SushiswapFarmAdapter", { + const result = await deploy("SushiswapPoolAdapter", { from: operatorAddress, contract: { abi: artifact.abi, @@ -36,19 +36,19 @@ const func: DeployFunction = async ({ if (CONTRACTS_VERIFY == "true") { if (result.newlyDeployed) { - const sushiswapFarmAdapter = await deployments.get("SushiswapFarmAdapter"); + const sushiswapPoolAdapter = await deployments.get("SushiswapPoolAdapter"); if (networkName === "tenderly") { await tenderly.verify({ - name: "SushiswapFarmAdapter", - address: sushiswapFarmAdapter.address, + name: "sushiswapPoolAdapter", + address: sushiswapPoolAdapter.address, constructorArguments: [registryProxyAddress], }); } else if (!["31337"].includes(chainId)) { await waitforme(20000); await run("verify:verify", { - name: "SushiswapFarmAdapter", - address: sushiswapFarmAdapter.address, + name: "SushiswapPoolAdapter", + address: sushiswapPoolAdapter.address, constructorArguments: [registryProxyAddress], }); } @@ -56,5 +56,5 @@ const func: DeployFunction = async ({ } }; export default func; -func.tags = ["PolygonSushiswapFarmAdapter"]; +func.tags = ["PolygonSushiswapPoolAdapter"]; func.dependencies = ["Registry"]; diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 8e5cd4500..98751c029 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -392,19 +392,139 @@ const kovanStrategiesByToken = { const polygonStrategiesbyToken = { USDC: { - // USDC -> curve/aave3crv -> Beefy - // USDC -> sushi/usdc-usdt -> Beefy - // USDC -> sushi/usdc-dai -> Beefy - // USDC -> aave + "usdc-DEPOSIT-CurveStableSwap-am3CRV": { + strategyName: "usdc-DEPOSIT-CurveStableSwap-am3CRV", + token: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", + strategy: [ + { + contract: "0x445FE580eF8d70FF569aB36e80c647af338db351", + outputToken: "0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171", + isBorrow: false, + outputTokenSymbol: "am3CRV", + adapterName: "CurveStableSwapAdapter", + protocol: "Curve", + }, + ], + }, + "usdc-DEPOSIT-Aave-amUSDC": { + strategyName: "usdc-DEPOSIT-Aave-amUSDC", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "0x3ac4e9aa29940770aeC38fe853a4bbabb2dA9C19", + outputToken: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", + isBorrow: false, + outputTokenSymbol: "amUSDC", + adapterName: "AaveAdapter", + protocol: "Aave", + }, + ], + }, + "usdc-DEPOSIT-CurveStableSwap-am3CRV-DEPOSIT-Beefy-mooCurveAm3CRV": { + strategyName: "usdc-DEPOSIT-CurveStableSwap-am3CRV-DEPOSIT-Beefy-mooCurveAm3CRV", + token: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", + strategy: [ + { + contract: "0x445FE580eF8d70FF569aB36e80c647af338db351", + outputToken: "0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171", + isBorrow: false, + outputTokenSymbol: "am3CRV", + adapterName: "CurveStableSwapAdapter", + protocol: "Curve", + }, + { + contract: "0xAA7C2879DaF8034722A0977f13c343aF0883E92e", + outputToken: "0xAA7C2879DaF8034722A0977f13c343aF0883E92e", + isBorrow: false, + outputTokenSymbol: "mooCurveAm3CRV", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", + }, + ], + }, + "usdc-DEPOSIT-Sushiswap-USDC-USDT-SLP-DEPOSIT-Beefy-mooSushiUSDC-USDT": { + strategyName: "usdc-DEPOSIT-USDCUSDTSLP-DEPOSIT-Beefy-mooSushiUSDC-USDT", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "0x4b1f1e2435a9c96f7330faea190ef6a7c8d70001", + outputToken: "0x4b1f1e2435a9c96f7330faea190ef6a7c8d70001", + isBorrow: false, + outputTokenSymbol: "USDC-USDT-SLP", + adapterName: "SushiswapPoolAdapter", + protocol: "Sushiswap", + }, + { + contract: "0xB6B89a05ad8228b98d0D8a77e1a695c54500db3b", + outputToken: "0xB6B89a05ad8228b98d0D8a77e1a695c54500db3b", + isBorrow: false, + outputTokenSymbol: "mooSushiUSDC-USDT", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", + }, + ], + }, + "usdc-DEPOSIT-Sushiswap-USDC-DAI-SLP-DEPOSIT-Beefy-mooSushiUSDC-DAI": { + strategyName: "usdc-DEPOSIT-Sushiswap-USDC-DAI-SLP-DEPOSIT-Beefy-mooSushiUSDC-DAI", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "0xcd578f016888b57f1b1e3f887f392f0159e26747", + outputToken: "0xcd578f016888b57f1b1e3f887f392f0159e26747", + isBorrow: false, + outputTokenSymbol: "USDC-DAI-SLP", + adapterName: "SushiswapPoolAdapter", + protocol: "Sushiswap", + }, + { + contract: "0x75424BE5378621AeC2eEF25965f40FeB59039B52", + outputToken: "0x75424BE5378621AeC2eEF25965f40FeB59039B52", + isBorrow: false, + outputTokenSymbol: "mooSushiUSDC-DAI", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", + }, + ], + }, + "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT": {}, + "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI": {}, + "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": {}, + "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": {}, }, WMATIC: { - // WMATIC -> aave + "wmatic-DEPOSIT-Aave-amWMATIC": { + strategyName: "wmatic-DEPOSIT-Aave-amWMATIC", + token: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + strategy: [ + { + contract: "0x3ac4e9aa29940770aeC38fe853a4bbabb2dA9C19", + outputToken: "0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4", + isBorrow: false, + outputTokenSymbol: "amWMATIC", + adapterName: "AaveAdapter", + protocol: "Aave", + }, + ], + }, }, }; const mumbaiStrategiesbyToken = { USDC: { - // USDC -> aave + "usdc-DEPOSIT-Aave-amUSDC": { + strategyName: "", + token: "0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e", + strategy: [ + { + contract: "0xE6ef11C967898F9525D550014FDEdCFAB63536B5", + outputToken: "0x2271e3Fef9e15046d09E1d78a8FF038c691E9Cf9", + isBorrow: false, + outputTokenSymbol: "amUSDC", + adapterName: "AaveAdapter", + protocol: "Aave", + }, + ], + }, }, }; From 76475cafd175473eb1802ee77ee43ea45f274e1f Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 30 Mar 2022 17:06:51 -0400 Subject: [PATCH 24/52] chore(lint): ignore adapter for lint/prettier --- .eslintignore | 2 +- .prettierignore | 2 +- .solhintignore | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintignore b/.eslintignore index 107154455..28f9d1d89 100644 --- a/.eslintignore +++ b/.eslintignore @@ -17,6 +17,6 @@ contracts/protocol/curve-metapool-gauge-adapter contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap-farm-polygon +contracts/protocol/sushiswap_pools_adapter # files .solcover.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index b53b4494c..9a6a7d74b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -19,7 +19,7 @@ contracts/protocol/curve-metapool-gauge-adapter contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap-farm-polygon +contracts/protocol/sushiswap_pools_adapter # files *.env diff --git a/.solhintignore b/.solhintignore index 100d6ddb3..9fcd23ad2 100644 --- a/.solhintignore +++ b/.solhintignore @@ -14,4 +14,5 @@ contracts/protocol/curve-metapool-gauge-adapter contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap-farm-polygon \ No newline at end of file +contracts/protocol/sushiswap-farm-polygon +contracts/protocol/sushiswap_pools_adapter \ No newline at end of file From 35428b13607982ab617a49493017394909c25bf4 Mon Sep 17 00:00:00 2001 From: leodinh Date: Thu, 31 Mar 2022 12:26:13 -0400 Subject: [PATCH 25/52] refactor: used util functions --- test/test-opty/4_vaultv2_strategies.spec.ts | 49 +++++++++++++-------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index 6f3b7eb38..ce5c93882 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -8,7 +8,8 @@ import { eEVMNetwork, NETWORKS_CHAIN_ID_HEX } from "../../helper-hardhat-config" import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; import { Registry, RiskManager, StrategyProvider, Vault, ERC20, IAdapterFull } from "../../typechain"; import { generateTokenHashV2, generateStrategyHashV2 } from "../../helpers/helpers"; -import { setTokenBalanceInStorage } from "./utils"; +import { StrategyStepType } from "../../helpers/type"; +import { setTokenBalanceInStorage, getLastStrategyStepBalanceLP } from "./utils"; import BN from "bignumber.js"; import { BigNumber } from "ethers"; @@ -154,6 +155,12 @@ describe("VaultV2", () => { const tokenHash = generateTokenHashV2([strategyDetail.token], NETWORKS_CHAIN_ID_HEX[fork]); const strategyHash = generateStrategyHashV2(strategyDetail.strategy, tokenHash); const lastPool = strategyDetail.strategy[strategyDetail.strategy.length - 1].contract; + const steps = strategyDetail.strategy.map(item => ({ + pool: item.contract, + outputToken: item.outputToken, + isBorrow: item.isBorrow, + })); + describe(`${strategy}`, () => { before(async function () { const approveLqPoolList = []; @@ -171,7 +178,7 @@ describe("VaultV2", () => { await (this.strategyProvider as any).setBestStrategy( 1, tokenHash, - strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), + steps.map(item => Object.values(item)), ); this.token = await ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, strategyDetail.token); this.adapter = ( @@ -184,7 +191,7 @@ describe("VaultV2", () => { it("should receive new strategy after rebalancing", async function () { await this.vaults[token].rebalance(); expect(await this.vaults[token].getInvestStrategySteps()).to.deep.eq( - strategyDetail.strategy.map(item => [item.contract, item.outputToken, item.isBorrow]), + steps.map(item => Object.values(item)), ); expect(await this.vaults[token].investStrategyHash()).to.eq(strategyHash); }); @@ -201,17 +208,19 @@ describe("VaultV2", () => { expect(userBalanceBefore).gt(userBalanceAfter); const vaultBalanceBefore = await this.vaults[token].balanceUT(); - const poolBalanceBefore = await this.adapter.getLiquidityPoolTokenBalance( - this.vaults[token].address, - this.token.address, - strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + const poolBalanceBefore = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, ); await this.vaults[token].connect(this.signers.financeOperator).vaultDepositAllToStrategy(); const vaultBalanceAfter = await this.vaults[token].balanceUT(); - const poolBalanceAfter = await this.adapter.getLiquidityPoolTokenBalance( - this.vaults[token].address, - this.token.address, - lastPool, + const poolBalanceAfter = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, ); expect(vaultBalanceBefore).gt(vaultBalanceAfter); expect(poolBalanceBefore).lt(poolBalanceAfter); @@ -219,17 +228,19 @@ describe("VaultV2", () => { it(`alice withdraw. Should withdraw from strategy successfully`, async function () { const _userDepositInDecimals = await this.vaults[token].minimumDepositValueUT(); const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); - const poolBalanceBefore = await this.adapter.getLiquidityPoolTokenBalance( - this.vaults[token].address, - this.token.address, - strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + const poolBalanceBefore = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, ); await this.vaults[token].connect(this.signers.alice).userWithdrawVault(_userDepositInDecimals, [], []); const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); - const poolBalanceAfter = await this.adapter.getLiquidityPoolTokenBalance( - this.vaults[token].address, - this.token.address, - strategyDetail.strategy[strategyDetail.strategy.length - 1].contract, + const poolBalanceAfter = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, ); expect(userBalanceBefore).lt(userBalanceAfter); expect(poolBalanceBefore).gt(poolBalanceAfter); From 9c9543ec7aae05c93d17714b27af5fb1a763d1d9 Mon Sep 17 00:00:00 2001 From: leodinh Date: Thu, 31 Mar 2022 15:06:42 -0400 Subject: [PATCH 26/52] refactor: added strategy polygon cmd --- helpers/data/adapter-with-strategies.ts | 16 ++++++++-------- package.json | 1 + test/test-opty/4_vaultv2_strategies.spec.ts | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 98751c029..d8c8149b2 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -447,8 +447,8 @@ const polygonStrategiesbyToken = { token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", strategy: [ { - contract: "0x4b1f1e2435a9c96f7330faea190ef6a7c8d70001", - outputToken: "0x4b1f1e2435a9c96f7330faea190ef6a7c8d70001", + contract: "0x4B1F1e2435A9C96f7330FAea190Ef6A7C8D70001", + outputToken: "0x4B1F1e2435A9C96f7330FAea190Ef6A7C8D70001", isBorrow: false, outputTokenSymbol: "USDC-USDT-SLP", adapterName: "SushiswapPoolAdapter", @@ -469,8 +469,8 @@ const polygonStrategiesbyToken = { token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", strategy: [ { - contract: "0xcd578f016888b57f1b1e3f887f392f0159e26747", - outputToken: "0xcd578f016888b57f1b1e3f887f392f0159e26747", + contract: "0xCD578F016888B57F1b1e3f887f392F0159E26747", + outputToken: "0xCD578F016888B57F1b1e3f887f392F0159E26747", isBorrow: false, outputTokenSymbol: "USDC-DAI-SLP", adapterName: "SushiswapPoolAdapter", @@ -486,10 +486,10 @@ const polygonStrategiesbyToken = { }, ], }, - "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT": {}, - "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI": {}, - "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": {}, - "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": {}, + // "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT": {}, + // "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI": {}, + // "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": {}, + // "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": {}, }, WMATIC: { "wmatic-DEPOSIT-Aave-amWMATIC": { diff --git a/package.json b/package.json index 7d11a2c25..b0b7105a1 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "test-clean": "yarn clean && yarn test", "test-fast:vaultv2-upgrade-test:mainnet": "env SKIP_LOAD=true FORK=mainnet NETWORK_NAME=mainnet TS_NODE_TRANSPILE_ONLY=1 hardhat --max-memory 4096 test test/test-opty/2_vaultv2_mainnet_upgrade.spec.ts", "test-fast:mainnet": "env SKIP_LOAD=true TS_NODE_TRANSPILE_ONLY=1 FORK=mainnet NETWORK_NAME=mainnet hardhat --max-memory 4096 test test/test-opty/3_vaultv2.spec.ts", + "test-fast:vaultv2-strategy:polygon": "env SKIP_LOAD=true TS_NODE_TRANSPILE_ONLY=1 FORK=polygon NETWORK_NAME=polygon hardhat --max-memory 4096 test test/test-opty/4_vaultv2_strategies.spec.ts", "test-fast": "env SKIP_LOAD=true TS_NODE_TRANSPILE_ONLY=1 hardhat --max-memory 4096 test test/test-opty/*.spec.ts", "watch:test": "hardhat --max-memory 4096 watch test", "coverage": "cross-env CODE_COVERAGE=true hardhat --max-memory 4096 coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"./test/test-opty/*.spec.ts\"", diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index ce5c93882..a6aef1ec9 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -226,7 +226,7 @@ describe("VaultV2", () => { expect(poolBalanceBefore).lt(poolBalanceAfter); }); it(`alice withdraw. Should withdraw from strategy successfully`, async function () { - const _userDepositInDecimals = await this.vaults[token].minimumDepositValueUT(); + const userWithdrawBalance = await this.vaults[token].balanceOf(this.signers.alice.address); const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); const poolBalanceBefore = await getLastStrategyStepBalanceLP( steps as StrategyStepType[], @@ -234,7 +234,7 @@ describe("VaultV2", () => { this.vaults[token], this.token, ); - await this.vaults[token].connect(this.signers.alice).userWithdrawVault(_userDepositInDecimals, [], []); + await this.vaults[token].connect(this.signers.alice).userWithdrawVault(userWithdrawBalance, [], []); const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); const poolBalanceAfter = await getLastStrategyStepBalanceLP( steps as StrategyStepType[], From a1005223a3be08f8c8c19a671a16827416cbc193 Mon Sep 17 00:00:00 2001 From: Leo Tuan Dinh <54964744+leodinh@users.noreply.github.com> Date: Thu, 31 Mar 2022 16:29:16 -0400 Subject: [PATCH 27/52] Update manual.yml --- .github/workflows/manual.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 6b20c0706..e6720b469 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -93,6 +93,7 @@ jobs: env: MAINNET_NODE_URL: ${{ secrets.MAINNET_NODE_URL}} + POLYGON_NODE_URL: ${{ secrets.POLYGON_NODE_URL}} COINMARKETCAP_API: ${{ secrets.COINMARKETCAP_API}} REPORT_GAS: true MNEMONIC: ${{ secrets.MNEMONIC}} @@ -125,3 +126,4 @@ jobs: run: | yarn test-fast:mainnet yarn test-fast:vaultv2-upgrade-test:mainnet + yarn test-fast:vaultv2-strategy:polygon From 7b116baa20cfdff43ab551ad5cabcbfd8f33f823 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 31 Mar 2022 16:42:40 -0400 Subject: [PATCH 28/52] feat(quickswap): add quickswap adapter for polygon --- .eslintignore | 1 + .gitmodules | 3 + .prettierignore | 1 + .solhintignore | 3 +- contracts/protocol/quickswap-pool-polygon | 1 + helpers/data/adapter-with-strategies.ts | 79 +++++++++++++++++++++-- 6 files changed, 83 insertions(+), 5 deletions(-) create mode 160000 contracts/protocol/quickswap-pool-polygon diff --git a/.eslintignore b/.eslintignore index 28f9d1d89..6cdb2bc57 100644 --- a/.eslintignore +++ b/.eslintignore @@ -18,5 +18,6 @@ contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter contracts/protocol/sushiswap_pools_adapter +contracts/protocol/quickswap-pool-polygon # files .solcover.js \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 8e87ef0a2..d84416fa9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "contracts/protocol/sushiswap_pools_adapter"] path = contracts/protocol/sushiswap_pools_adapter url = git@github.com:Opty-Fi/sushiswap_pools_adapter.git +[submodule "contracts/protocol/quickswap-pool-polygon"] + path = contracts/protocol/quickswap-pool-polygon + url = git@github.com:Opty-Fi/quickswap-pool-polygon.git diff --git a/.prettierignore b/.prettierignore index 9a6a7d74b..798e8bdb4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -20,6 +20,7 @@ contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter contracts/protocol/sushiswap_pools_adapter +contracts/protocol/quickswap-pool-polygon # files *.env diff --git a/.solhintignore b/.solhintignore index 9fcd23ad2..510f5da72 100644 --- a/.solhintignore +++ b/.solhintignore @@ -15,4 +15,5 @@ contracts/protocol/curve-metapool-swap-adapter contracts/protocol/curve-polygon-adapter contracts/protocol/aave-polygon-adapter contracts/protocol/sushiswap-farm-polygon -contracts/protocol/sushiswap_pools_adapter \ No newline at end of file +contracts/protocol/sushiswap_pools_adapter +contracts/protocol/quickswap-pool-polygon \ No newline at end of file diff --git a/contracts/protocol/quickswap-pool-polygon b/contracts/protocol/quickswap-pool-polygon new file mode 160000 index 000000000..61c0594d6 --- /dev/null +++ b/contracts/protocol/quickswap-pool-polygon @@ -0,0 +1 @@ +Subproject commit 61c0594d654d641ba329a45484e9ece94f46e64c diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 98751c029..54df7325a 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -392,7 +392,7 @@ const kovanStrategiesByToken = { const polygonStrategiesbyToken = { USDC: { - "usdc-DEPOSIT-CurveStableSwap-am3CRV": { + "usdc-DEPOSIT-CurveStableSwap-am3CRV-DEPOSIT-CurveGauge-am3CRV-gauge": { strategyName: "usdc-DEPOSIT-CurveStableSwap-am3CRV", token: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", strategy: [ @@ -404,6 +404,14 @@ const polygonStrategiesbyToken = { adapterName: "CurveStableSwapAdapter", protocol: "Curve", }, + { + contract: "0x19793B454D3AfC7b454F206Ffe95aDE26cA6912c", + outputToken: "0x19793B454D3AfC7b454F206Ffe95aDE26cA6912c", + isBorrow: false, + outputTokenSymbol: "am3CRV-gauge", + adapterName: "CurveGaugeAdapter", + protocol: "Curve", + }, ], }, "usdc-DEPOSIT-Aave-amUSDC": { @@ -486,9 +494,72 @@ const polygonStrategiesbyToken = { }, ], }, - "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT": {}, - "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI": {}, - "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": {}, + "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT": { + strategyName: "usdc-DEPOSIT-Quickswap-USDC-USDT-QLP-Beefy-mooQuickUSDC-USDT", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + ], + }, + "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI": { + strategyName: "usdc-DEPOSIT-Quickswap-USDC-DAI-QLP-Beefy-mooQuickUSDC-DAI", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + ], + }, + "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": { + strategyName: "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + { + contract: "", + outputToken: "", + isBorrow: false, + outputTokenSymbol: "", + adapterName: "", + protocol: "", + }, + ], + }, "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": {}, }, WMATIC: { From c741d65a84c1cb1937e4da992c7adf31f44a6f9d Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 31 Mar 2022 17:10:36 -0400 Subject: [PATCH 29/52] chore(adapters): organise per chain --- .gitmodules | 36 +++++++++---------- .../protocol/adapters/avalanche/.gitkeep | 0 .../protocol/{ => adapters}/defi-adapters | 0 .../ethereum}/curve-metapool-gauge-adapter | 0 .../ethereum}/curve-metapool-swap-adapter | 0 .../ethereum}/team-defi-adapters | 0 .../polygon}/aave-polygon-adapter | 0 .../polygon}/curve-polygon-adapter | 0 .../polygon/quickswap-pool-adapter} | 0 .../polygon}/sushiswap_pools_adapter | 0 10 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 contracts/protocol/adapters/avalanche/.gitkeep rename contracts/protocol/{ => adapters}/defi-adapters (100%) rename contracts/protocol/{ => adapters/ethereum}/curve-metapool-gauge-adapter (100%) rename contracts/protocol/{ => adapters/ethereum}/curve-metapool-swap-adapter (100%) rename contracts/protocol/{ => adapters/ethereum}/team-defi-adapters (100%) rename contracts/protocol/{ => adapters/polygon}/aave-polygon-adapter (100%) rename contracts/protocol/{ => adapters/polygon}/curve-polygon-adapter (100%) rename contracts/protocol/{quickswap-pool-polygon => adapters/polygon/quickswap-pool-adapter} (100%) rename contracts/protocol/{ => adapters/polygon}/sushiswap_pools_adapter (100%) diff --git a/.gitmodules b/.gitmodules index d84416fa9..29dbe0247 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,27 +1,27 @@ -[submodule "contracts/protocol/team-defi-adapters"] - path = contracts/protocol/team-defi-adapters - url = git@github.com:Opty-Fi/team-defi-adapters.git [submodule "contracts/protocol/earn-protocol-configuration"] path = contracts/protocol/earn-protocol-configuration url = git@github.com:Opty-Fi/earn-protocol-configuration.git -[submodule "contracts/protocol/defi-adapters"] - path = contracts/protocol/defi-adapters - url = https://github.com/Opty-Fi/defi-adapters.git -[submodule "contracts/protocol/curve-metapool-swap-adapter"] - path = contracts/protocol/curve-metapool-swap-adapter +[submodule "contracts/protocol/adapters/ethereum/team-defi-adapters"] + path = contracts/protocol/adapters/ethereum/team-defi-adapters + url = git@github.com:Opty-Fi/team-defi-adapters.git +[submodule "contracts/protocol/adapters/defi-adapters"] + path = contracts/protocol/adapters/defi-adapters + url = git@github.com:Opty-Fi/defi-adapters.git +[submodule "contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter"] + path = contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter url = git@github.com:Opty-Fi/curve-metapool-swap-adapter.git -[submodule "contracts/protocol/curve-metapool-gauge-adapter"] - path = contracts/protocol/curve-metapool-gauge-adapter +[submodule "contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter"] + path = contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter url = git@github.com:Opty-Fi/curve-metapool-gauge-adapter.git -[submodule "contracts/protocol/curve-polygon-adapter"] - path = contracts/protocol/curve-polygon-adapter +[submodule "contracts/protocol/adapters/polygon/curve-polygon-adapter"] + path = contracts/protocol/adapters/polygon/curve-polygon-adapter url = git@github.com:Opty-Fi/curve-polygon-adapter.git -[submodule "contracts/protocol/aave-polygon-adapter"] - path = contracts/protocol/aave-polygon-adapter +[submodule "contracts/protocol/adapters/polygon/aave-polygon-adapter"] + path = contracts/protocol/adapters/polygon/aave-polygon-adapter url = git@github.com:Opty-Fi/aave-polygon-adapter.git -[submodule "contracts/protocol/sushiswap_pools_adapter"] - path = contracts/protocol/sushiswap_pools_adapter +[submodule "contracts/protocol/adapters/polygon/sushiswap_pools_adapter"] + path = contracts/protocol/adapters/polygon/sushiswap_pools_adapter url = git@github.com:Opty-Fi/sushiswap_pools_adapter.git -[submodule "contracts/protocol/quickswap-pool-polygon"] - path = contracts/protocol/quickswap-pool-polygon +[submodule "contracts/protocol/adapters/polygon/quickswap-pool-adapter"] + path = contracts/protocol/adapters/polygon/quickswap-pool-adapter url = git@github.com:Opty-Fi/quickswap-pool-polygon.git diff --git a/contracts/protocol/adapters/avalanche/.gitkeep b/contracts/protocol/adapters/avalanche/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/contracts/protocol/defi-adapters b/contracts/protocol/adapters/defi-adapters similarity index 100% rename from contracts/protocol/defi-adapters rename to contracts/protocol/adapters/defi-adapters diff --git a/contracts/protocol/curve-metapool-gauge-adapter b/contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter similarity index 100% rename from contracts/protocol/curve-metapool-gauge-adapter rename to contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter diff --git a/contracts/protocol/curve-metapool-swap-adapter b/contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter similarity index 100% rename from contracts/protocol/curve-metapool-swap-adapter rename to contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter diff --git a/contracts/protocol/team-defi-adapters b/contracts/protocol/adapters/ethereum/team-defi-adapters similarity index 100% rename from contracts/protocol/team-defi-adapters rename to contracts/protocol/adapters/ethereum/team-defi-adapters diff --git a/contracts/protocol/aave-polygon-adapter b/contracts/protocol/adapters/polygon/aave-polygon-adapter similarity index 100% rename from contracts/protocol/aave-polygon-adapter rename to contracts/protocol/adapters/polygon/aave-polygon-adapter diff --git a/contracts/protocol/curve-polygon-adapter b/contracts/protocol/adapters/polygon/curve-polygon-adapter similarity index 100% rename from contracts/protocol/curve-polygon-adapter rename to contracts/protocol/adapters/polygon/curve-polygon-adapter diff --git a/contracts/protocol/quickswap-pool-polygon b/contracts/protocol/adapters/polygon/quickswap-pool-adapter similarity index 100% rename from contracts/protocol/quickswap-pool-polygon rename to contracts/protocol/adapters/polygon/quickswap-pool-adapter diff --git a/contracts/protocol/sushiswap_pools_adapter b/contracts/protocol/adapters/polygon/sushiswap_pools_adapter similarity index 100% rename from contracts/protocol/sushiswap_pools_adapter rename to contracts/protocol/adapters/polygon/sushiswap_pools_adapter From e4abb3b28d770973364e76ed5aac7e59792fc7ab Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 31 Mar 2022 17:30:25 -0400 Subject: [PATCH 30/52] refactor(devpops): ignore adapter dirs --- .eslintignore | 18 +++++++++--------- .gitmodules | 4 ++-- .prettierignore | 18 +++++++++--------- .solhintignore | 19 +++++++++---------- ...ap-pool-adapter => quickswap-pool-polygon} | 0 5 files changed, 29 insertions(+), 30 deletions(-) rename contracts/protocol/adapters/polygon/{quickswap-pool-adapter => quickswap-pool-polygon} (100%) diff --git a/.eslintignore b/.eslintignore index 6cdb2bc57..73a11ca0b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -9,15 +9,15 @@ node_modules/ typechain/ specification_docs/ deployments/ -contracts/protocol/team-defi-adapters +contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/defi-adapters -contracts/protocol/curve-metapool-deposit-adapter -contracts/protocol/curve-metapool-gauge-adapter -contracts/protocol/curve-metapool-swap-adapter -contracts/protocol/curve-polygon-adapter -contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap_pools_adapter -contracts/protocol/quickswap-pool-polygon +contracts/protocol/adapters/defi-adapters +contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter +contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter +contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter +contracts/protocol/adapters/polygon/curve-polygon-adapter +contracts/protocol/adapters/polygon/aave-polygon-adapter +contracts/protocol/adapters/polygon/sushiswap_pools_adapter +contracts/protocol/adapters/polygon/quickswap-pool-polygon # files .solcover.js \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 29dbe0247..b374d2667 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,6 +22,6 @@ [submodule "contracts/protocol/adapters/polygon/sushiswap_pools_adapter"] path = contracts/protocol/adapters/polygon/sushiswap_pools_adapter url = git@github.com:Opty-Fi/sushiswap_pools_adapter.git -[submodule "contracts/protocol/adapters/polygon/quickswap-pool-adapter"] - path = contracts/protocol/adapters/polygon/quickswap-pool-adapter +[submodule "contracts/protocol/adapters/polygon/quickswap-pool-polygon"] + path = contracts/protocol/adapters/polygon/quickswap-pool-polygon url = git@github.com:Opty-Fi/quickswap-pool-polygon.git diff --git a/.prettierignore b/.prettierignore index 798e8bdb4..0219ea090 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,16 +11,16 @@ **/node_modules **/typechain **/specification_docs -contracts/protocol/team-defi-adapters +contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/defi-adapters -contracts/protocol/curve-metapool-deposit-adapter -contracts/protocol/curve-metapool-gauge-adapter -contracts/protocol/curve-metapool-swap-adapter -contracts/protocol/curve-polygon-adapter -contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap_pools_adapter -contracts/protocol/quickswap-pool-polygon +contracts/protocol/adapters/defi-adapters +contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter +contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter +contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter +contracts/protocol/adapters/polygon/curve-polygon-adapter +contracts/protocol/adapters/polygon/aave-polygon-adapter +contracts/protocol/adapters/polygon/sushiswap_pools_adapter +contracts/protocol/adapters/polygon/quickswap-pool-polygon # files *.env diff --git a/.solhintignore b/.solhintignore index 510f5da72..6a2ca908c 100644 --- a/.solhintignore +++ b/.solhintignore @@ -6,14 +6,13 @@ contracts/libraries/ contracts/utils/ contracts/dependencies/ contracts/mocks/ -contracts/protocol/team-defi-adapters +contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/defi-adapters -contracts/protocol/curve-metapool-deposit-adapter -contracts/protocol/curve-metapool-gauge-adapter -contracts/protocol/curve-metapool-swap-adapter -contracts/protocol/curve-polygon-adapter -contracts/protocol/aave-polygon-adapter -contracts/protocol/sushiswap-farm-polygon -contracts/protocol/sushiswap_pools_adapter -contracts/protocol/quickswap-pool-polygon \ No newline at end of file +contracts/protocol/adapters/defi-adapters +contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter +contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter +contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter +contracts/protocol/adapters/polygon/curve-polygon-adapter +contracts/protocol/adapters/polygon/aave-polygon-adapter +contracts/protocol/adapters/polygon/sushiswap_pools_adapter +contracts/protocol/adapters/polygon/quickswap-pool-polygon \ No newline at end of file diff --git a/contracts/protocol/adapters/polygon/quickswap-pool-adapter b/contracts/protocol/adapters/polygon/quickswap-pool-polygon similarity index 100% rename from contracts/protocol/adapters/polygon/quickswap-pool-adapter rename to contracts/protocol/adapters/polygon/quickswap-pool-polygon From 6a5629596fa8f821ea5cf8daac378b97a73a5b91 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 31 Mar 2022 19:20:12 -0400 Subject: [PATCH 31/52] refactor(deploy): add strategies and ref deployment script --- .../007_deploy_quickswappooladapter.ts | 60 +++++++++++++ ...approveandmaptokenshashtotokens_tokens.ts} | 0 ...09_approveliquiditypools_maptoadapters.ts} | 0 ...ity_pool.ts => 010_rate_liquidity_pool.ts} | 0 ...opUSDCgrow.ts => 011_deploy_opUSDCgrow.ts} | 0 ...ATICgrow.ts => 012_deploy_opWMATICgrow.ts} | 0 helpers/data/adapter-with-strategies.ts | 85 ++++++++++++------- 7 files changed, 113 insertions(+), 32 deletions(-) create mode 100644 deploy_polygon/007_deploy_quickswappooladapter.ts rename deploy_polygon/{007_approveandmaptokenshashtotokens_tokens.ts => 008_approveandmaptokenshashtotokens_tokens.ts} (100%) rename deploy_polygon/{008_approveliquiditypools_maptoadapters.ts => 009_approveliquiditypools_maptoadapters.ts} (100%) rename deploy_polygon/{009_rate_liquidity_pool.ts => 010_rate_liquidity_pool.ts} (100%) rename deploy_polygon/{010_deploy_opUSDCgrow.ts => 011_deploy_opUSDCgrow.ts} (100%) rename deploy_polygon/{011_deploy_opWMATICgrow.ts => 012_deploy_opWMATICgrow.ts} (100%) diff --git a/deploy_polygon/007_deploy_quickswappooladapter.ts b/deploy_polygon/007_deploy_quickswappooladapter.ts new file mode 100644 index 000000000..8122d68fd --- /dev/null +++ b/deploy_polygon/007_deploy_quickswappooladapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("QuickSwapPoolAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("QuickSwapPoolAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const quickSwapPoolAdapter = await deployments.get("QuickSwapPoolAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "QuickSwapPoolAdapter", + address: quickSwapPoolAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "QuickSwapPoolAdapter", + address: quickSwapPoolAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonQuickSwapPoolAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts b/deploy_polygon/008_approveandmaptokenshashtotokens_tokens.ts similarity index 100% rename from deploy_polygon/007_approveandmaptokenshashtotokens_tokens.ts rename to deploy_polygon/008_approveandmaptokenshashtotokens_tokens.ts diff --git a/deploy_polygon/008_approveliquiditypools_maptoadapters.ts b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts similarity index 100% rename from deploy_polygon/008_approveliquiditypools_maptoadapters.ts rename to deploy_polygon/009_approveliquiditypools_maptoadapters.ts diff --git a/deploy_polygon/009_rate_liquidity_pool.ts b/deploy_polygon/010_rate_liquidity_pool.ts similarity index 100% rename from deploy_polygon/009_rate_liquidity_pool.ts rename to deploy_polygon/010_rate_liquidity_pool.ts diff --git a/deploy_polygon/010_deploy_opUSDCgrow.ts b/deploy_polygon/011_deploy_opUSDCgrow.ts similarity index 100% rename from deploy_polygon/010_deploy_opUSDCgrow.ts rename to deploy_polygon/011_deploy_opUSDCgrow.ts diff --git a/deploy_polygon/011_deploy_opWMATICgrow.ts b/deploy_polygon/012_deploy_opWMATICgrow.ts similarity index 100% rename from deploy_polygon/011_deploy_opWMATICgrow.ts rename to deploy_polygon/012_deploy_opWMATICgrow.ts diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 54df7325a..5e7e80a8e 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -499,20 +499,20 @@ const polygonStrategiesbyToken = { token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", strategy: [ { - contract: "", - outputToken: "", + contract: "0x2cF7252e74036d1Da831d11089D326296e64a728", + outputToken: "0x2cF7252e74036d1Da831d11089D326296e64a728", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "USDC-USDT-QLP", + adapterName: "QuickSwapPoolAdapter", + protocol: "Quickswap", }, { - contract: "", - outputToken: "", + contract: "0x4462817b53E76b722c2D174D0148ddb81452f1dE", + outputToken: "0x4462817b53E76b722c2D174D0148ddb81452f1dE", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "mooQuickUSDC-USDT", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", }, ], }, @@ -521,46 +521,67 @@ const polygonStrategiesbyToken = { token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", strategy: [ { - contract: "", - outputToken: "", + contract: "0xf04adBF75cDFc5eD26eeA4bbbb991DB002036Bdd", + outputToken: "0xf04adBF75cDFc5eD26eeA4bbbb991DB002036Bdd", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "USDC-DAI-QLP", + adapterName: "QuickSwapPoolAdapter", + protocol: "Quickswap", }, { - contract: "", - outputToken: "", + contract: "0x0dFd8c4dd493d8f87Be362878E41537Ca7Ee4d9e", + outputToken: "0x0dFd8c4dd493d8f87Be362878E41537Ca7Ee4d9e", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "mooquickUSDC-DAI", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", }, ], }, - "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI": { + "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooMaiUSDC-miMATIC": { strategyName: "usdc-DEPOSIT-Quickswap-USDC-MAI-QLP-Beefy-mooQuickUSDC-MAI", token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", strategy: [ { - contract: "", - outputToken: "", + contract: "0x160532D2536175d65C03B97b0630A9802c274daD", + outputToken: "0x160532D2536175d65C03B97b0630A9802c274daD", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "USDC-MAI-QLP", + adapterName: "QuickSwapPoolAdapter", + protocol: "Quickswap", }, { - contract: "", - outputToken: "", + contract: "0xebe0c8d842AA5A57D7BEf8e524dEabA676F91cD1", + outputToken: "0xebe0c8d842AA5A57D7BEf8e524dEabA676F91cD1", isBorrow: false, - outputTokenSymbol: "", - adapterName: "", - protocol: "", + outputTokenSymbol: "mooMaiUSDC-miMATIC", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", + }, + ], + }, + "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": { + strategyName: "usdc-DEPOSIT-Apeswap-USDC-MAI-QLP-Beefy-mooApeUSDC-MAI", + token: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + strategy: [ + { + contract: "0x5b13B583D4317aB15186Ed660A1E4C65C10da659", + outputToken: "0x5b13B583D4317aB15186Ed660A1E4C65C10da659", + isBorrow: false, + outputTokenSymbol: "USDC-MAI-QLP", + adapterName: "ApeSwapPoolAdapter", + protocol: "Apeswap", + }, + { + contract: "0x8440DAe4E1002e83D57fbFD6d33E6F3684a35036", + outputToken: "0x8440DAe4E1002e83D57fbFD6d33E6F3684a35036", + isBorrow: false, + outputTokenSymbol: "mooApeSwapUSDC-DAI", + adapterName: "BeefyFinanceAdapter", + protocol: "Beefy", }, ], }, - "usdc-DEPOSIT-Apeswap-USDC-DAI-ALP-Beefy-mooApeUSDC-DAI": {}, }, WMATIC: { "wmatic-DEPOSIT-Aave-amWMATIC": { From 24198e3b0b1c485c55c6d0f7ecc653dea0f2fdcf Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Fri, 1 Apr 2022 11:10:25 -0400 Subject: [PATCH 32/52] feat(deploy): rate,map and approve pools --- .../protocol/adapters/avalanche/.gitkeep | 0 ...ter.ts => 002_deploy_curvegaugeadapter.ts} | 0 .../002_deploy_curvemetapoolfactoryadapter.ts | 60 ---------- ...r.ts => 003_deploy_beefyfinanceadapter.ts} | 0 ...veadapter.ts => 004_deploy_aaveadapter.ts} | 0 ....ts => 005_deploy_sushiswappooladapter.ts} | 0 ....ts => 006_deploy_quickswappooladapter.ts} | 0 ...009_approveliquiditypools_maptoadapters.ts | 109 ++++++++++++++++++ deploy_polygon/010_rate_liquidity_pool.ts | 0 helpers/data/adapter-with-strategies.ts | 2 +- 10 files changed, 110 insertions(+), 61 deletions(-) delete mode 100644 contracts/protocol/adapters/avalanche/.gitkeep rename deploy_polygon/{003_deploy_curvegaugeadapter.ts => 002_deploy_curvegaugeadapter.ts} (100%) delete mode 100644 deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts rename deploy_polygon/{004_deploy_beefyfinanceadapter.ts => 003_deploy_beefyfinanceadapter.ts} (100%) rename deploy_polygon/{005_deploy_aaveadapter.ts => 004_deploy_aaveadapter.ts} (100%) rename deploy_polygon/{006_deploy_sushiswappooladapter.ts => 005_deploy_sushiswappooladapter.ts} (100%) rename deploy_polygon/{007_deploy_quickswappooladapter.ts => 006_deploy_quickswappooladapter.ts} (100%) delete mode 100644 deploy_polygon/010_rate_liquidity_pool.ts diff --git a/contracts/protocol/adapters/avalanche/.gitkeep b/contracts/protocol/adapters/avalanche/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/deploy_polygon/003_deploy_curvegaugeadapter.ts b/deploy_polygon/002_deploy_curvegaugeadapter.ts similarity index 100% rename from deploy_polygon/003_deploy_curvegaugeadapter.ts rename to deploy_polygon/002_deploy_curvegaugeadapter.ts diff --git a/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts b/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts deleted file mode 100644 index 5c47a4a39..000000000 --- a/deploy_polygon/002_deploy_curvemetapoolfactoryadapter.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { DeployFunction } from "hardhat-deploy/dist/types"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; -import { waitforme } from "../helpers/utils"; -import { Registry } from "../typechain"; - -const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; - -const func: DeployFunction = async ({ - deployments, - getChainId, - ethers, - network, - tenderly, - run, -}: HardhatRuntimeEnvironment) => { - const { deploy } = deployments; - const artifact = await deployments.getArtifact("CurveMetapoolFactoryAdapter"); - const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; - const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); - const operatorAddress = await registryV2Instance.getOperator(); - const chainId = await getChainId(); - const networkName = network.name; - - const result = await deploy("CurveMetapoolFactoryAdapter", { - from: operatorAddress, - contract: { - abi: artifact.abi, - bytecode: artifact.bytecode, - deployedBytecode: artifact.deployedBytecode, - }, - args: [registryProxyAddress], - log: true, - skipIfAlreadyDeployed: true, - }); - - if (CONTRACTS_VERIFY == "true") { - if (result.newlyDeployed) { - const curveMetapoolFactoryAdapter = await deployments.get("CurveMetapoolFactoryAdapter"); - if (networkName === "tenderly") { - await tenderly.verify({ - name: "CurveMetapoolFactoryAdapter", - address: curveMetapoolFactoryAdapter.address, - constructorArguments: [registryProxyAddress], - }); - } else if (!["31337"].includes(chainId)) { - await waitforme(20000); - - await run("verify:verify", { - name: "CurveMetapoolFactoryAdapter", - address: curveMetapoolFactoryAdapter.address, - constructorArguments: [registryProxyAddress], - }); - } - } - } -}; -export default func; -func.tags = ["PolygonCurveMetapoolFactoryAdapter"]; -func.dependencies = ["Registry"]; diff --git a/deploy_polygon/004_deploy_beefyfinanceadapter.ts b/deploy_polygon/003_deploy_beefyfinanceadapter.ts similarity index 100% rename from deploy_polygon/004_deploy_beefyfinanceadapter.ts rename to deploy_polygon/003_deploy_beefyfinanceadapter.ts diff --git a/deploy_polygon/005_deploy_aaveadapter.ts b/deploy_polygon/004_deploy_aaveadapter.ts similarity index 100% rename from deploy_polygon/005_deploy_aaveadapter.ts rename to deploy_polygon/004_deploy_aaveadapter.ts diff --git a/deploy_polygon/006_deploy_sushiswappooladapter.ts b/deploy_polygon/005_deploy_sushiswappooladapter.ts similarity index 100% rename from deploy_polygon/006_deploy_sushiswappooladapter.ts rename to deploy_polygon/005_deploy_sushiswappooladapter.ts diff --git a/deploy_polygon/007_deploy_quickswappooladapter.ts b/deploy_polygon/006_deploy_quickswappooladapter.ts similarity index 100% rename from deploy_polygon/007_deploy_quickswappooladapter.ts rename to deploy_polygon/006_deploy_quickswappooladapter.ts diff --git a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts index e69de29bb..49cab1dee 100644 --- a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts +++ b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts @@ -0,0 +1,109 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; + +const func: DeployFunction = async ({ deployments, ethers }: HardhatRuntimeEnvironment) => { + const { getAddress } = ethers.utils; + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const curveStableSwapAdapter = await deployments.get("CurveStableSwapAdapter"); + const curveGaugeAdapter = await deployments.get("CurveGaugeAdapter"); + const beefyFinanceAdapter = await deployments.get("BeefyFinanceAdapter"); + const aaveAdapter = await deployments.get("AaveAdapter"); + const sushiswapPoolAdapter = await deployments.get("SushiswapPoolAdapter"); + const quickSwapPoolAdapter = await deployments.get("QuickSwapPoolAdapter"); + // const apeSwapPoolAdapter = await deployments.get("ApeSwapPoolAdapter") + + const operatorAddress = await registryV2Instance.getOperator(); + const operatorSigner = await ethers.getSigner(operatorAddress); + const riskOperatorAddress = await registryV2Instance.getRiskOperator(); + const riskOperatorSigner = await ethers.getSigner(riskOperatorAddress); + + // approve liquidity pools and map to adapter + const poolsWithRatings: { [key: string]: { rate: number; adapter: string } } = { + "0x3ac4e9aa29940770aeC38fe853a4bbabb2dA9C19": { rate: 90, adapter: aaveAdapter.address }, // aave lendingpoolregistryprovider + "0x445FE580eF8d70FF569aB36e80c647af338db351": { rate: 80, adapter: curveStableSwapAdapter.address }, // curve Pool for am3CRV + "0x19793B454D3AfC7b454F206Ffe95aDE26cA6912c": { rate: 80, adapter: curveGaugeAdapter.address }, // curve gauge for am3Crv + "0xAA7C2879DaF8034722A0977f13c343aF0883E92e": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooCurveAm3CRV + "0xB6B89a05ad8228b98d0D8a77e1a695c54500db3b": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooSushiUSDC-USDT + "0x75424BE5378621AeC2eEF25965f40FeB59039B52": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooSushiUSDC-DAI + "0x4462817b53E76b722c2D174D0148ddb81452f1dE": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooQuickUSDC-USDT + "0x0dFd8c4dd493d8f87Be362878E41537Ca7Ee4d9e": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooquickUSDC-DAI + "0xebe0c8d842AA5A57D7BEf8e524dEabA676F91cD1": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooMaiUSDC-miMATIC + "0x8440DAe4E1002e83D57fbFD6d33E6F3684a35036": { rate: 80, adapter: beefyFinanceAdapter.address }, // pool for mooApeSwapUSDC-DAI + "0x4b1f1e2435a9c96f7330faea190ef6a7c8d70001": { rate: 80, adapter: sushiswapPoolAdapter.address }, // pool for USDC-USDT-SLP + "0xcd578f016888b57f1b1e3f887f392f0159e26747": { rate: 80, adapter: sushiswapPoolAdapter.address }, // pool for USDC-DAI-SLP + "0x2cF7252e74036d1Da831d11089D326296e64a728": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-USDT-QLP + "0xf04adBF75cDFc5eD26eeA4bbbb991DB002036Bdd": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-DAI-QLP + "0x160532D2536175d65C03B97b0630A9802c274daD": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-MAI-QLP + // "0x5b13B583D4317aB15186Ed660A1E4C65C10da659":{rate:80, adapter: apeSwapAdapter.address}, // pool for USDC-DAI-ALP + }; + + const onlyMapPoolsToAdapters = []; + const approveLiquidityPoolAndMap = []; + const ratePools: [string, number][] = []; + + for (const pool of Object.keys(poolsWithRatings)) { + const { rating, isLiquidityPool } = await registryV2Instance.getLiquidityPool(pool); + const adapter = await registryV2Instance.liquidityPoolToAdapter(pool); + if (!isLiquidityPool && getAddress(adapter) != getAddress(poolsWithRatings[pool].adapter)) { + approveLiquidityPoolAndMap.push([pool, poolsWithRatings[pool].adapter]); + } + if (isLiquidityPool && getAddress(adapter) != getAddress(poolsWithRatings[pool].adapter)) { + onlyMapPoolsToAdapters.push([pool, poolsWithRatings[pool].adapter]); + } + if (rating != poolsWithRatings[pool].rate) { + ratePools.push([pool, poolsWithRatings[pool].rate]); + } + } + + console.log("==Approve liquidity pool and map to adapter=="); + if (approveLiquidityPoolAndMap.length > 0) { + // approve liquidity pool and map adapter + console.log( + `operator approving and mapping ${approveLiquidityPoolAndMap.length} pools ...`, + approveLiquidityPoolAndMap, + ); + const approveLiquidityPoolAndMapAdapterTx = await registryV2Instance + .connect(operatorSigner) + ["approveLiquidityPoolAndMapToAdapter((address,address)[])"](approveLiquidityPoolAndMap); + await approveLiquidityPoolAndMapAdapterTx.wait(); + } else { + console.log("Already approved liquidity pool and map to adapter"); + } + + console.log("==Only map liquidity pool to adapter=="); + if (onlyMapPoolsToAdapters.length > 0) { + // only map pool to adapter + console.log(`operator only mapping ${onlyMapPoolsToAdapters.length} pools ...`, onlyMapPoolsToAdapters); + const mapToAdapterTx = await registryV2Instance + .connect(operatorSigner) + ["setLiquidityPoolToAdapter((address,address)[])"](onlyMapPoolsToAdapters); + await mapToAdapterTx.wait(); + } else { + console.log("Already mapped to adapter"); + } + + console.log("==Only rate liquidity pool=="); + if (ratePools.length > 0) { + // rate pools + console.log(`risk operator rating ${ratePools.length} pools ...`, ratePools); + const rateAdapterTx = await registryV2Instance + .connect(riskOperatorSigner) + ["rateLiquidityPool((address,uint8)[])"](ratePools); + await rateAdapterTx.wait(); + } else { + console.log("Already rate liquidity pool"); + } +}; +export default func; +func.tags = ["PolygonApproveAndMapLiquidityPoolToAdapter"]; +func.dependencies = [ + "PolygonCurveStableSwapAdapter", + "PolygonCurveMetapoolFactoryAdapter", + "PolygonCurveGaugeAdapter", + "PolygonBeefyFinanceAdapter", + "PolygonAaveAdapter", + "PolygonSushiswapPoolAdapter", + "", +]; diff --git a/deploy_polygon/010_rate_liquidity_pool.ts b/deploy_polygon/010_rate_liquidity_pool.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/helpers/data/adapter-with-strategies.ts b/helpers/data/adapter-with-strategies.ts index 5e7e80a8e..05b842fd5 100644 --- a/helpers/data/adapter-with-strategies.ts +++ b/helpers/data/adapter-with-strategies.ts @@ -568,7 +568,7 @@ const polygonStrategiesbyToken = { contract: "0x5b13B583D4317aB15186Ed660A1E4C65C10da659", outputToken: "0x5b13B583D4317aB15186Ed660A1E4C65C10da659", isBorrow: false, - outputTokenSymbol: "USDC-MAI-QLP", + outputTokenSymbol: "USDC-DAI-ALP", adapterName: "ApeSwapPoolAdapter", protocol: "Apeswap", }, From d5b9ed3bf39ee7c9ff06af0df8902df567b732ae Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Fri, 1 Apr 2022 19:51:54 -0400 Subject: [PATCH 33/52] feat(migrations): config vault and set strategy tasks --- cli.md | 18 +- ...009_approveliquiditypools_maptoadapters.ts | 3 +- ...opUSDCgrow.ts => 010_deploy_opUSDCgrow.ts} | 0 deploy_polygon/011_config_opUSDCgrow.ts | 187 ++++++++++++++++++ deploy_polygon/013_config_opWMATICgrow.ts | 186 +++++++++++++++++ tasks/actions/set-best-strategy.ts | 155 ++++++++++++--- 6 files changed, 511 insertions(+), 38 deletions(-) rename deploy_polygon/{011_deploy_opUSDCgrow.ts => 010_deploy_opUSDCgrow.ts} (100%) create mode 100644 deploy_polygon/011_config_opUSDCgrow.ts create mode 100644 deploy_polygon/013_config_opWMATICgrow.ts diff --git a/cli.md b/cli.md index 102423261..03bd3dcde 100644 --- a/cli.md +++ b/cli.md @@ -342,12 +342,12 @@ Options: Usage: set best strategy or default best strategy Options: ---token required
the address of token ---riskprofilecode required the code of risk profile ---strategyhash required the keccak256 hash of strategy ---strategyprovider required
the address of strategyProvider ---isdefault required whether set best default strategy or not ---network optional name of the network provider (default: hardhat) +--token required
the address of token +--risk-profile-code required the code of risk profile +--strategy-name required the name of strategy +--strategy-provider required
the address of strategyProvider +--is-default required whether set best default strategy or not +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -356,10 +356,10 @@ Options: yarn hardhat set-best-strategy \ --network localhost \ --riskprofilecode 1 \ - --strategyprovider 0x0000000000000000000000000000000000000000 \ - --strategyhash 0x0000000000000000000000000000000000000000 \ + --strategy-provider 0x0000000000000000000000000000000000000000 \ + --strategy-name "wmatic-DEPOSIT-Aave-amWMATIC" \ --token 0x0000000000000000000000000000000000000000 \ - --isdefault true + --is-default true ``` ### unpause-vault diff --git a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts index 49cab1dee..acb333d8d 100644 --- a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts +++ b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts @@ -100,10 +100,9 @@ export default func; func.tags = ["PolygonApproveAndMapLiquidityPoolToAdapter"]; func.dependencies = [ "PolygonCurveStableSwapAdapter", - "PolygonCurveMetapoolFactoryAdapter", "PolygonCurveGaugeAdapter", "PolygonBeefyFinanceAdapter", "PolygonAaveAdapter", "PolygonSushiswapPoolAdapter", - "", + // "PolygonApeswapPoolAdapter", ]; diff --git a/deploy_polygon/011_deploy_opUSDCgrow.ts b/deploy_polygon/010_deploy_opUSDCgrow.ts similarity index 100% rename from deploy_polygon/011_deploy_opUSDCgrow.ts rename to deploy_polygon/010_deploy_opUSDCgrow.ts diff --git a/deploy_polygon/011_config_opUSDCgrow.ts b/deploy_polygon/011_config_opUSDCgrow.ts new file mode 100644 index 000000000..6ca00b6fc --- /dev/null +++ b/deploy_polygon/011_config_opUSDCgrow.ts @@ -0,0 +1,187 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const { BigNumber } = ethers; + + const networkName = eEVMNetwork.polygon; + const strategyName = "usdc-DEPOSIT-CurveStableSwap-am3CRV-DEPOSIT-Beefy-mooCurveAm3CRV"; + // bit 0-15 deposit fee in underlying token without decimals 0000 (no fee) + // bit 16-31 deposit fee in basis points 0000 (0% or 0 basis points) + // bit 32-47 withdrawal fee in underlying token without decimals 0000 (no fee) + // bit 48-63 withdrawal fee in basis points 000 (0% or 0 basis points) + // bit 64-79 max vault value jump allowed in basis points (standard deviation allowed for vault value) 0064 (0.01% or 100 basis points) + // bit 80-239 vault fee collection address 0000000000000000000000000000000000000000 (no address set) + // bit 240-247 risk profile code 01 + // bit 248 emergency shutdown flag 0 + // bit 249 pause flag (deposit/withdraw is pause when bit is unset, unpause otherwise) 1 + // bit 250 white list state flag 1 + // bit 251-255 reserved 00000 + // 0x0601000000000000000000000000000000000000000000640000000000000000 + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + // no whitelist state + // 0x0201000000000000000000000000000000000000000000640000000000000000 + // const expectedConfig = BigNumber.from("906392544231311161076231617881117198619499239097192527361058388634069106688"); + const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC + const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const expectedRiskProfileCode = BigNumber.from("1"); + + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opUSDCgrowAddress = await (await deployments.get("opUSDCgrow")).address; // fetches proxy address + const strategyProviderAddress = await (await deployments.get("StrategyProvider")).address; + + const opUSDCgrowInstance = await ethers.getContractAt("Vault", opUSDCgrowAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opUSDCgrow"); + console.log("\n"); + const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opUSDCgrow.."); + console.log("\n"); + const tx1 = await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + await tx1.wait(1); + } + + console.log("vaultConfiguration for opUSDCgrow"); + console.log("\n"); + + const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + const tx2 = await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + const tx3 = await opUSDCgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash); + await tx3.wait(1); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opUSDCgrow config..."); + console.log("\n"); + + const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); + + console.log("opUSDCgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); + console.log("\n"); + const tx4 = await opUSDCgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + await tx4.wait(1); + } + + console.log("unpause opUSDCgrow"); + console.log("\n"); + const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opUSDCgrow vault..."); + console.log("\n"); + const tx5 = await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); + await tx5.wait(1); + } else { + console.log("opUSDCgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opUSDCgrow"); + console.log("\n"); + const actualAccountsRoot = await opUSDCgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opUSDCgrow vault..."); + console.log("\n"); + const tx6 = await opUSDCgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + await tx6.wait(1); + } else { + console.log("whitelisted accounts root for opUSDCgrow is as expected"); + console.log("\n"); + } + + const strategyProviderInstance = await ethers.getContractAt( + ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, + strategyProviderAddress, + ); + const strategyOperatorSigner = await ethers.getSigner(await registryV2Instance.strategyOperator()); + + console.log("Operator setting best strategy for opUSDCgrow..."); + console.log("\n"); + + const currentBestStrategySteps = await strategyProviderInstance.getRpToTokenToBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash, + ); + const currentBestStrategyHash = await opUSDCgrowInstance.computeInvestStrategyHash(currentBestStrategySteps); + const expectedStrategySteps = StrategiesByTokenByChain[networkName].USDC[strategyName].strategy; + const expectedStrategyHash = await opUSDCgrowInstance.computeInvestStrategyHash( + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + + if (currentBestStrategyHash !== expectedStrategyHash) { + console.log("Strategy operator setting best strategy.."); + console.log("\n"); + const tx7 = await strategyProviderInstance.connect(strategyOperatorSigner).setBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash, + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + await tx7.wait(1); + } else { + console.log("best strategy is upto date."); + console.log("\n"); + } + console.log("Next Best Strategy ", await opUSDCgrowInstance.getNextBestInvestStrategy()); +}; +export default func; +func.tags = ["PolygonConfigopUSDCgrow"]; +func.dependencies = ["PolygonopUSDCgrow", "PolygonApproveAndMapLiquidityPoolToAdapter", "StrategyProvider"]; diff --git a/deploy_polygon/013_config_opWMATICgrow.ts b/deploy_polygon/013_config_opWMATICgrow.ts new file mode 100644 index 000000000..19ac43e02 --- /dev/null +++ b/deploy_polygon/013_config_opWMATICgrow.ts @@ -0,0 +1,186 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const { BigNumber } = ethers; + const networkName = eEVMNetwork.polygon; + const strategyName = "wmatic-DEPOSIT-Aave-amWMATIC"; + // bit 0-15 deposit fee in underlying token without decimals 0000 (no fee) + // bit 16-31 deposit fee in basis points 0000 (0% or 0 basis points) + // bit 32-47 withdrawal fee in underlying token without decimals 0000 (no fee) + // bit 48-63 withdrawal fee in basis points 000 (0% or 0 basis points) + // bit 64-79 max vault value jump allowed in basis points (standard deviation allowed for vault value) 0064 (0.01% or 100 basis points) + // bit 80-239 vault fee collection address 0000000000000000000000000000000000000000 (no address set) + // bit 240-247 risk profile code 01 + // bit 248 emergency shutdown flag 0 + // bit 249 pause flag (deposit/withdraw is pause when bit is unset, unpause otherwise) 1 + // bit 250 white list state flag 1 + // bit 251-255 reserved 00000 + // 0x0601000000000000000000000000000000000000000000640000000000000000 + const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + // no whitelist state + // 0x0201000000000000000000000000000000000000000000640000000000000000 + // const expectedConfig = BigNumber.from("906392544231311161076231617881117198619499239097192527361058388634069106688"); + const expectedUserDepositCapUT = ethers.utils.parseEther("60000"); // 60,000 WMATIC + const expectedMinimumDepositValueUT = ethers.utils.parseEther("600"); // 600 WMATIC + const expectedTotalValueLockedLimitUT = ethers.utils.parseEther("6000000"); // 6,000,000 WMATIC + const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; + const expectedRiskProfileCode = BigNumber.from("1"); + + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opWMATICgrowAddress = await (await deployments.get("opWMATICgrow")).address; // fetches proxy address + const strategyProviderAddress = await (await deployments.get("StrategyProvider")).address; + + const opWMATICgrowInstance = await ethers.getContractAt("Vault", opWMATICgrowAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opWMATICgrow"); + console.log("\n"); + const _vaultConfiguration_ = await opWMATICgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opWMATICgrow.."); + console.log("\n"); + const tx1 = await opWMATICgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + await tx1.wait(1); + } + + console.log("vaultConfiguration for opWMATICgrow"); + console.log("\n"); + + const _vaultConfiguration = await opWMATICgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opWMATICgrow.."); + console.log("\n"); + const tx2 = await opWMATICgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opWMATICgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS[networkName].WMATIC.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + const tx3 = await opWMATICgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS[networkName].WMATIC.hash); + await tx3.wait(1); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opWMATICgrow config..."); + console.log("\n"); + + const actualUserDepositCapUT = await opWMATICgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opWMATICgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opWMATICgrowInstance.totalValueLockedLimitUT(); + + console.log("opWMATICgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opWMATICgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opWMATICgrow..."); + console.log("\n"); + const tx4 = await opWMATICgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + await tx4.wait(1); + } + + console.log("unpause opWMATICgrow"); + console.log("\n"); + const vaultConfiguration = await opWMATICgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opWMATICgrow vault..."); + console.log("\n"); + const tx5 = await opWMATICgrowInstance.connect(governanceSigner).setUnpaused(true); + await tx5.wait(1); + } else { + console.log("opWMATICgrow is already unpaused..."); + console.log("\n"); + } + + console.log("whitelisting for opWMATICgrow"); + console.log("\n"); + const actualAccountsRoot = await opWMATICgrowInstance.whitelistedAccountsRoot(); + if (actualAccountsRoot != expectedAccountsRoot) { + console.log("Governance setting whitelisted account root opWMATICgrow vault..."); + console.log("\n"); + const tx6 = await opWMATICgrowInstance.connect(governanceSigner).setWhitelistedAccountsRoot(expectedAccountsRoot); + await tx6.wait(1); + } else { + console.log("whitelisted accounts root for opWMATICgrow is as expected"); + console.log("\n"); + } + + const strategyProviderInstance = await ethers.getContractAt( + ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, + strategyProviderAddress, + ); + const strategyOperatorSigner = await ethers.getSigner(await registryV2Instance.strategyOperator()); + + console.log("Operator setting best strategy for opWMATICgrow..."); + console.log("\n"); + + const currentBestStrategySteps = await strategyProviderInstance.getRpToTokenToBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].WMATIC.hash, + ); + const currentBestStrategyHash = await opWMATICgrowInstance.computeInvestStrategyHash(currentBestStrategySteps); + const expectedStrategySteps = StrategiesByTokenByChain[networkName].WMATIC[strategyName].strategy; + const expectedStrategyHash = await opWMATICgrowInstance.computeInvestStrategyHash( + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + + if (currentBestStrategyHash !== expectedStrategyHash) { + console.log("Strategy operator setting best strategy.."); + console.log("\n"); + const tx7 = await strategyProviderInstance.connect(strategyOperatorSigner).setBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].WMATIC.hash, + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + await tx7.wait(1); + } else { + console.log("best strategy is upto date."); + console.log("\n"); + } + console.log("Next Best Strategy ", await opWMATICgrowInstance.getNextBestInvestStrategy()); +}; +export default func; +func.tags = ["PolygonConfigopWMATICgrow"]; +func.dependencies = ["PolygonopWMATICgrow", "PolygonApproveAndMapLiquidityPoolToAdapter", "StrategyProvider"]; diff --git a/tasks/actions/set-best-strategy.ts b/tasks/actions/set-best-strategy.ts index 3e26f4bee..ab65b7f66 100644 --- a/tasks/actions/set-best-strategy.ts +++ b/tasks/actions/set-best-strategy.ts @@ -1,22 +1,25 @@ import { task, types } from "hardhat/config"; -import { isAddress, generateTokenHash } from "../../helpers/helpers"; -import { RISK_PROFILES } from "../../helpers/constants/contracts-data"; +import { isAddress, generateStrategyHashV2 } from "../../helpers/helpers"; import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; import TASKS from "../task-names"; +import { ERC20, Registry, StrategyProvider } from "../../typechain"; +import { StrategiesByTokenByChain } from "../../helpers/data/adapter-with-strategies"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../../helpers/constants/tokens"; task(TASKS.ACTION_TASKS.SET_BEST_STRATEGY.NAME, TASKS.ACTION_TASKS.SET_BEST_STRATEGY.DESCRIPTION) .addParam("token", "the address of token", "", types.string) - .addParam("riskprofilecode", "the code of risk profile", 0, types.int) - .addParam("strategyhash", "the keccak256 hash of strategy", "", types.string) - .addParam("strategyprovider", "the address of strategyProvider", "", types.string) - .addParam("isdefault", "whether set best default strategy or not", false, types.boolean) - .setAction(async ({ token, riskprofilecode, strategyhash, strategyprovider, isdefault }, hre) => { - if (strategyprovider === "") { - throw new Error("strategyprovider cannot be empty"); + .addParam("riskProfileCode", "the code of risk profile", 0, types.int) + .addParam("strategyName", "name of the strategy", "", types.string) + .addParam("strategyProvider", "address of the strategy provider", "", types.string) + .addParam("isDefault", "set best default strategy", false, types.boolean) + .setAction(async ({ token, riskProfileCode, strategyName, strategyProvider, isDefault }, hre) => { + const chainId = await hre.getChainId(); + if (strategyProvider === "") { + throw new Error("strategyProvider cannot be empty"); } - if (!isAddress(strategyprovider)) { - throw new Error("strategyprovider address is invalid"); + if (!isAddress(strategyProvider)) { + throw new Error("strategyProvider address is invalid"); } if (token === "") { @@ -27,24 +30,122 @@ task(TASKS.ACTION_TASKS.SET_BEST_STRATEGY.NAME, TASKS.ACTION_TASKS.SET_BEST_STRA throw new Error("token address is invalid"); } - if (RISK_PROFILES.filter(item => item.code === riskprofilecode).length === 0) { - throw new Error("risk profile is not available"); - } - - if (strategyhash === "") { - throw new Error("strategyhash cannot be empty"); - } - try { - const strategyProvider = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, strategyprovider); - const tokensHash = generateTokenHash([token]); - console.log(`Invest step strategy Hash : ${strategyhash}`); - if (isdefault) { - await strategyProvider.setBestDefaultStrategy(riskprofilecode, tokensHash, strategyhash); - console.log(`Set best default strategy successfully`); + const strategyProviderInstance = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, strategyProvider) + ); + const registryAddress = await strategyProviderInstance.registryContract(); + const registryInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryAddress); + const strategyOperatorAddress = await registryInstance.strategyOperator(); + const signer = await hre.ethers.getSigner(strategyOperatorAddress); + const tokenInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.ERC20, token); + const tokenSymbol = await (await tokenInstance.symbol()).toUpperCase(); + const tokensHash = MULTI_CHAIN_VAULT_TOKENS[chainId][tokenSymbol].hash; + const strategyHash = + strategyName !== undefined && strategyName != "" + ? generateStrategyHashV2(StrategiesByTokenByChain[chainId][tokenSymbol][strategyName].strategy, tokensHash) + : hre.ethers.constants.HashZero; + console.log(`Invest step strategy hash : ${strategyHash}`); + if (isDefault) { + const bestDefaultStrategy = await strategyProviderInstance.getRpToTokenToDefaultStrategy( + riskProfileCode, + tokensHash, + ); + const bestDefaultStrategyHash = + bestDefaultStrategy.length > 0 + ? generateStrategyHashV2( + bestDefaultStrategy.map(x => ({ + contract: x.pool, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + tokensHash, + ) + : hre.ethers.constants.HashZero; + console.log("bestDefaultStrategyHash ", bestDefaultStrategyHash); + if (bestDefaultStrategyHash != strategyHash) { + const tx1 = await strategyProviderInstance.connect(signer).setBestDefaultStrategy( + riskProfileCode, + tokensHash, + strategyName !== undefined && strategyName != "" + ? StrategiesByTokenByChain[chainId][tokenSymbol][strategyName].strategy.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })) + : [], + ); + await tx1.wait(1); + console.log(`Set best default strategy successfully`); + } else { + console.log(`Best default strategy is upto date`); + } + const currentBestDefaultStrategy = await strategyProviderInstance.getRpToTokenToDefaultStrategy( + riskProfileCode, + tokensHash, + ); + const currentBestDefaultStrategyHash = + currentBestDefaultStrategy.length > 0 + ? generateStrategyHashV2( + currentBestDefaultStrategy.map(x => ({ + contract: x.pool, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + tokensHash, + ) + : hre.ethers.constants.HashZero; + console.log("currentBestDefaultStrategy ", currentBestDefaultStrategy); + console.log("currentBestDefaultStrategyHash ", currentBestDefaultStrategyHash); } else { - await strategyProvider.setBestStrategy(riskprofilecode, tokensHash, strategyhash); - console.log(`Set best strategy successfully`); + const bestStrategy = await strategyProviderInstance.getRpToTokenToBestStrategy(riskProfileCode, tokensHash); + console.log("bestStrategy ", bestStrategy); + const bestStrategyHash = + bestStrategy.length > 0 + ? generateStrategyHashV2( + bestStrategy.map(x => ({ + contract: x.pool, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + tokensHash, + ) + : hre.ethers.constants.HashZero; + console.log("bestStrategyHash ", bestStrategyHash); + if (bestStrategyHash != strategyHash) { + const tx2 = await strategyProviderInstance.connect(signer).setBestStrategy( + riskProfileCode, + tokensHash, + strategyName !== undefined && strategyName != "" + ? StrategiesByTokenByChain[chainId][tokenSymbol][strategyName].strategy.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })) + : [], + ); + await tx2.wait(1); + console.log(`Set best strategy successfully`); + } else { + console.log(`Best strategy is upto date`); + } + const currentBestStrategy = await strategyProviderInstance.getRpToTokenToBestStrategy( + riskProfileCode, + tokensHash, + ); + const currentBestStrategyHash = + currentBestStrategy.length > 0 + ? generateStrategyHashV2( + currentBestStrategy.map(x => ({ + contract: x.pool, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + tokensHash, + ) + : hre.ethers.constants.HashZero; + console.log("currentBestStrategy ", currentBestStrategy); + console.log("currentBestStrategyHash ", currentBestStrategyHash); } console.log("Finished setting best strategy"); } catch (error: any) { From 4947062995d4ea27d78ece61af165c307122ccb1 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Sat, 2 Apr 2022 01:21:02 -0400 Subject: [PATCH 34/52] feat(tasks): rebalance and set best strategy --- tasks/actions/get-price-per-full-share.ts | 2 +- tasks/actions/vault-actions.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/actions/get-price-per-full-share.ts b/tasks/actions/get-price-per-full-share.ts index d96eb827c..f097d1987 100644 --- a/tasks/actions/get-price-per-full-share.ts +++ b/tasks/actions/get-price-per-full-share.ts @@ -21,7 +21,7 @@ task(TASKS.ACTION_TASKS.GET_PRICE_PER_FULL_SHARE.NAME, TASKS.ACTION_TASKS.GET_PR if (_blockNumber == undefined) { _blockNumber = await hre.ethers.provider.getBlockNumber(); } - const vaultInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.Vault, vault); + const vaultInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, vault); const pricePerFullShare = await vaultInstance.getPricePerFullShare({ blockTag: _blockNumber }); console.log(`PricePerFullShare @${_blockNumber} is ${hre.ethers.utils.formatEther(pricePerFullShare)}`); } catch (error: any) { diff --git a/tasks/actions/vault-actions.ts b/tasks/actions/vault-actions.ts index 4bc089b40..0f1b4229b 100644 --- a/tasks/actions/vault-actions.ts +++ b/tasks/actions/vault-actions.ts @@ -210,7 +210,8 @@ task(TASKS.ACTION_TASKS.VAULT_ACTIONS.NAME, TASKS.ACTION_TASKS.VAULT_ACTIONS.DES "Price per full share before : ", hre.ethers.utils.formatEther(await vaultContract.getPricePerFullShare()), ); - await vaultContract.connect(userSigner).rebalance(); + const tx3 = await vaultContract.connect(userSigner).rebalance(); + await tx3.wait(1); console.log("Block after : ", await hre.ethers.provider.getBlockNumber()); console.log( "total supply after : ", From e8907cdd4598ff4c528292807c222856499a165a Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 4 Apr 2022 13:25:23 -0400 Subject: [PATCH 35/52] feat(adapter): apeswap --- .gitmodules | 3 +++ contracts/protocol/adapters/polygon/apeswap-pool-polygon | 1 + 2 files changed, 4 insertions(+) create mode 160000 contracts/protocol/adapters/polygon/apeswap-pool-polygon diff --git a/.gitmodules b/.gitmodules index b374d2667..77579eef6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,3 +25,6 @@ [submodule "contracts/protocol/adapters/polygon/quickswap-pool-polygon"] path = contracts/protocol/adapters/polygon/quickswap-pool-polygon url = git@github.com:Opty-Fi/quickswap-pool-polygon.git +[submodule "contracts/protocol/adapters/polygon/apeswap-pool-polygon"] + path = contracts/protocol/adapters/polygon/apeswap-pool-polygon + url = git@github.com:Opty-Fi/apeswap-pool-polygon.git diff --git a/contracts/protocol/adapters/polygon/apeswap-pool-polygon b/contracts/protocol/adapters/polygon/apeswap-pool-polygon new file mode 160000 index 000000000..d8e2a6b3b --- /dev/null +++ b/contracts/protocol/adapters/polygon/apeswap-pool-polygon @@ -0,0 +1 @@ +Subproject commit d8e2a6b3b87f6865e554c832d646dadadd138586 From b11c073fb4e31d41175e63b97fc73f4b8f14a027 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 4 Apr 2022 13:38:18 -0400 Subject: [PATCH 36/52] ci(adapter): ignore lint,prettier and cov --- .eslintignore | 1 + .prettierignore | 1 + .solhintignore | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 73a11ca0b..670eccb77 100644 --- a/.eslintignore +++ b/.eslintignore @@ -19,5 +19,6 @@ contracts/protocol/adapters/polygon/curve-polygon-adapter contracts/protocol/adapters/polygon/aave-polygon-adapter contracts/protocol/adapters/polygon/sushiswap_pools_adapter contracts/protocol/adapters/polygon/quickswap-pool-polygon +contracts/protocol/adapters/polygon/apeswap-pool-polygon # files .solcover.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 0219ea090..39ab90c67 100644 --- a/.prettierignore +++ b/.prettierignore @@ -21,6 +21,7 @@ contracts/protocol/adapters/polygon/curve-polygon-adapter contracts/protocol/adapters/polygon/aave-polygon-adapter contracts/protocol/adapters/polygon/sushiswap_pools_adapter contracts/protocol/adapters/polygon/quickswap-pool-polygon +contracts/protocol/adapters/polygon/apeswap-pool-polygon # files *.env diff --git a/.solhintignore b/.solhintignore index 6a2ca908c..efcdc7e66 100644 --- a/.solhintignore +++ b/.solhintignore @@ -15,4 +15,5 @@ contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter contracts/protocol/adapters/polygon/curve-polygon-adapter contracts/protocol/adapters/polygon/aave-polygon-adapter contracts/protocol/adapters/polygon/sushiswap_pools_adapter -contracts/protocol/adapters/polygon/quickswap-pool-polygon \ No newline at end of file +contracts/protocol/adapters/polygon/quickswap-pool-polygon +contracts/protocol/adapters/polygon/apeswap-pool-polygon \ No newline at end of file From 2a713d29fd6c2a373cded3ffc9e552204aec5661 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Mon, 4 Apr 2022 21:12:05 -0400 Subject: [PATCH 37/52] refactor(adapter): bump up apeswap commit --- .../adapters/polygon/apeswap-pool-polygon | 2 +- .../007_deploy_apeswappooladapter.ts | 60 +++++++++++++++++++ ...009_approveliquiditypools_maptoadapters.ts | 6 +- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 deploy_polygon/007_deploy_apeswappooladapter.ts diff --git a/contracts/protocol/adapters/polygon/apeswap-pool-polygon b/contracts/protocol/adapters/polygon/apeswap-pool-polygon index d8e2a6b3b..d6d2cdec1 160000 --- a/contracts/protocol/adapters/polygon/apeswap-pool-polygon +++ b/contracts/protocol/adapters/polygon/apeswap-pool-polygon @@ -1 +1 @@ -Subproject commit d8e2a6b3b87f6865e554c832d646dadadd138586 +Subproject commit d6d2cdec148e4945d9310cbe7657704c86e987ef diff --git a/deploy_polygon/007_deploy_apeswappooladapter.ts b/deploy_polygon/007_deploy_apeswappooladapter.ts new file mode 100644 index 000000000..fb247d785 --- /dev/null +++ b/deploy_polygon/007_deploy_apeswappooladapter.ts @@ -0,0 +1,60 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { waitforme } from "../helpers/utils"; +import { Registry } from "../typechain"; + +const CONTRACTS_VERIFY = process.env.CONTRACTS_VERIFY; + +const func: DeployFunction = async ({ + deployments, + getChainId, + ethers, + network, + tenderly, + run, +}: HardhatRuntimeEnvironment) => { + const { deploy } = deployments; + const artifact = await deployments.getArtifact("ApeSwapPoolAdapter"); + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const operatorAddress = await registryV2Instance.getOperator(); + const chainId = await getChainId(); + const networkName = network.name; + + const result = await deploy("ApeSwapPoolAdapter", { + from: operatorAddress, + contract: { + abi: artifact.abi, + bytecode: artifact.bytecode, + deployedBytecode: artifact.deployedBytecode, + }, + args: [registryProxyAddress], + log: true, + skipIfAlreadyDeployed: true, + }); + + if (CONTRACTS_VERIFY == "true") { + if (result.newlyDeployed) { + const apeSwapPoolAdapter = await deployments.get("ApeSwapPoolAdapter"); + if (networkName === "tenderly") { + await tenderly.verify({ + name: "ApeSwapPoolAdapter", + address: apeSwapPoolAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } else if (!["31337"].includes(chainId)) { + await waitforme(20000); + + await run("verify:verify", { + name: "ApeSwapPoolAdapter", + address: apeSwapPoolAdapter.address, + constructorArguments: [registryProxyAddress], + }); + } + } + } +}; +export default func; +func.tags = ["PolygonApeSwapPoolAdapter"]; +func.dependencies = ["Registry"]; diff --git a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts index acb333d8d..c6a974058 100644 --- a/deploy_polygon/009_approveliquiditypools_maptoadapters.ts +++ b/deploy_polygon/009_approveliquiditypools_maptoadapters.ts @@ -12,7 +12,7 @@ const func: DeployFunction = async ({ deployments, ethers }: HardhatRuntimeEnvir const aaveAdapter = await deployments.get("AaveAdapter"); const sushiswapPoolAdapter = await deployments.get("SushiswapPoolAdapter"); const quickSwapPoolAdapter = await deployments.get("QuickSwapPoolAdapter"); - // const apeSwapPoolAdapter = await deployments.get("ApeSwapPoolAdapter") + const apeSwapPoolAdapter = await deployments.get("ApeSwapPoolAdapter"); const operatorAddress = await registryV2Instance.getOperator(); const operatorSigner = await ethers.getSigner(operatorAddress); @@ -36,7 +36,7 @@ const func: DeployFunction = async ({ deployments, ethers }: HardhatRuntimeEnvir "0x2cF7252e74036d1Da831d11089D326296e64a728": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-USDT-QLP "0xf04adBF75cDFc5eD26eeA4bbbb991DB002036Bdd": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-DAI-QLP "0x160532D2536175d65C03B97b0630A9802c274daD": { rate: 80, adapter: quickSwapPoolAdapter.address }, // pool for USDC-MAI-QLP - // "0x5b13B583D4317aB15186Ed660A1E4C65C10da659":{rate:80, adapter: apeSwapAdapter.address}, // pool for USDC-DAI-ALP + "0x5b13B583D4317aB15186Ed660A1E4C65C10da659": { rate: 80, adapter: apeSwapPoolAdapter.address }, // pool for USDC-DAI-ALP }; const onlyMapPoolsToAdapters = []; @@ -104,5 +104,5 @@ func.dependencies = [ "PolygonBeefyFinanceAdapter", "PolygonAaveAdapter", "PolygonSushiswapPoolAdapter", - // "PolygonApeswapPoolAdapter", + "PolygonApeSwapPoolAdapter", ]; From 7ed906596dfcdbb294954f928e0d75906ce646ec Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Tue, 5 Apr 2022 22:12:26 -0400 Subject: [PATCH 38/52] feat(migration): finalize polygon and mumbai migration --- ...003_approveliquiditypools_maptoadapters.ts | 80 ++++++++ ...opUSDCgrow.ts => 004_deploy_opUSDCgrow.ts} | 0 deploy_mumbai/005_config_opUSDCgrow.ts | 173 ++++++++++++++++++ tsconfig.json | 6 +- 4 files changed, 256 insertions(+), 3 deletions(-) create mode 100644 deploy_mumbai/003_approveliquiditypools_maptoadapters.ts rename deploy_mumbai/{003_deploy_opUSDCgrow.ts => 004_deploy_opUSDCgrow.ts} (100%) create mode 100644 deploy_mumbai/005_config_opUSDCgrow.ts diff --git a/deploy_mumbai/003_approveliquiditypools_maptoadapters.ts b/deploy_mumbai/003_approveliquiditypools_maptoadapters.ts new file mode 100644 index 000000000..a0a44e332 --- /dev/null +++ b/deploy_mumbai/003_approveliquiditypools_maptoadapters.ts @@ -0,0 +1,80 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; + +const func: DeployFunction = async ({ deployments, ethers }: HardhatRuntimeEnvironment) => { + const { getAddress } = ethers.utils; + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const aaveAdapter = await deployments.get("AaveAdapter"); + + const operatorAddress = await registryV2Instance.getOperator(); + const operatorSigner = await ethers.getSigner(operatorAddress); + const riskOperatorAddress = await registryV2Instance.getRiskOperator(); + const riskOperatorSigner = await ethers.getSigner(riskOperatorAddress); + + // approve liquidity pools and map to adapter + const poolsWithRatings: { [key: string]: { rate: number; adapter: string } } = { + "0xE6ef11C967898F9525D550014FDEdCFAB63536B5": { rate: 90, adapter: aaveAdapter.address }, // aave lendingpoolregistryprovider + }; + + const onlyMapPoolsToAdapters = []; + const approveLiquidityPoolAndMap = []; + const ratePools: [string, number][] = []; + + for (const pool of Object.keys(poolsWithRatings)) { + const { rating, isLiquidityPool } = await registryV2Instance.getLiquidityPool(pool); + const adapter = await registryV2Instance.liquidityPoolToAdapter(pool); + if (!isLiquidityPool && getAddress(adapter) != getAddress(poolsWithRatings[pool].adapter)) { + approveLiquidityPoolAndMap.push([pool, poolsWithRatings[pool].adapter]); + } + if (isLiquidityPool && getAddress(adapter) != getAddress(poolsWithRatings[pool].adapter)) { + onlyMapPoolsToAdapters.push([pool, poolsWithRatings[pool].adapter]); + } + if (rating != poolsWithRatings[pool].rate) { + ratePools.push([pool, poolsWithRatings[pool].rate]); + } + } + + console.log("==Approve liquidity pool and map to adapter=="); + if (approveLiquidityPoolAndMap.length > 0) { + // approve liquidity pool and map adapter + console.log( + `operator approving and mapping ${approveLiquidityPoolAndMap.length} pools ...`, + approveLiquidityPoolAndMap, + ); + const approveLiquidityPoolAndMapAdapterTx = await registryV2Instance + .connect(operatorSigner) + ["approveLiquidityPoolAndMapToAdapter((address,address)[])"](approveLiquidityPoolAndMap); + await approveLiquidityPoolAndMapAdapterTx.wait(); + } else { + console.log("Already approved liquidity pool and map to adapter"); + } + + console.log("==Only map liquidity pool to adapter=="); + if (onlyMapPoolsToAdapters.length > 0) { + // only map pool to adapter + console.log(`operator only mapping ${onlyMapPoolsToAdapters.length} pools ...`, onlyMapPoolsToAdapters); + const mapToAdapterTx = await registryV2Instance + .connect(operatorSigner) + ["setLiquidityPoolToAdapter((address,address)[])"](onlyMapPoolsToAdapters); + await mapToAdapterTx.wait(); + } else { + console.log("Already mapped to adapter"); + } + + console.log("==Only rate liquidity pool=="); + if (ratePools.length > 0) { + // rate pools + console.log(`risk operator rating ${ratePools.length} pools ...`, ratePools); + const rateAdapterTx = await registryV2Instance + .connect(riskOperatorSigner) + ["rateLiquidityPool((address,uint8)[])"](ratePools); + await rateAdapterTx.wait(); + } else { + console.log("Already rate liquidity pool"); + } +}; +export default func; +func.tags = ["MumbaiApproveAndMapLiquidityPoolToAdapter"]; +func.dependencies = ["MumbaiAaveAdapter"]; diff --git a/deploy_mumbai/003_deploy_opUSDCgrow.ts b/deploy_mumbai/004_deploy_opUSDCgrow.ts similarity index 100% rename from deploy_mumbai/003_deploy_opUSDCgrow.ts rename to deploy_mumbai/004_deploy_opUSDCgrow.ts diff --git a/deploy_mumbai/005_config_opUSDCgrow.ts b/deploy_mumbai/005_config_opUSDCgrow.ts new file mode 100644 index 000000000..967b791f6 --- /dev/null +++ b/deploy_mumbai/005_config_opUSDCgrow.ts @@ -0,0 +1,173 @@ +import { DeployFunction } from "hardhat-deploy/dist/types"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { eEVMNetwork } from "../helper-hardhat-config"; +import { ESSENTIAL_CONTRACTS } from "../helpers/constants/essential-contracts-name"; +import { MULTI_CHAIN_VAULT_TOKENS } from "../helpers/constants/tokens"; +import { StrategiesByTokenByChain } from "../helpers/data/adapter-with-strategies"; +import { getRiskProfileCode, getUnpause } from "../helpers/utils"; + +const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvironment) => { + const { BigNumber } = ethers; + + const networkName = eEVMNetwork.mumbai; + const strategyName = "usdc-DEPOSIT-Aave-amUSDC"; + // bit 0-15 deposit fee in underlying token without decimals 0000 (no fee) + // bit 16-31 deposit fee in basis points 0000 (0% or 0 basis points) + // bit 32-47 withdrawal fee in underlying token without decimals 0000 (no fee) + // bit 48-63 withdrawal fee in basis points 000 (0% or 0 basis points) + // bit 64-79 max vault value jump allowed in basis points (standard deviation allowed for vault value) 0064 (0.01% or 100 basis points) + // bit 80-239 vault fee collection address 0000000000000000000000000000000000000000 (no address set) + // bit 240-247 risk profile code 01 + // bit 248 emergency shutdown flag 0 + // bit 249 pause flag (deposit/withdraw is pause when bit is unset, unpause otherwise) 1 + // bit 250 white list state flag 1 + // bit 251-255 reserved 00000 + // 0x0601000000000000000000000000000000000000000000640000000000000000 + // const expectedConfig = BigNumber.from("2715643938564376714569528258641865758826842749497826340477583138757711757312"); + // no whitelist state + // 0x0201000000000000000000000000000000000000000000640000000000000000 + const expectedConfig = BigNumber.from("906392544231311161076231617881117198619499239097192527361058388634069106688"); + const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("5000000"); // 5 USDC + const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 + const expectedRiskProfileCode = BigNumber.from("1"); + + const registryProxyAddress = await (await deployments.get("RegistryProxy")).address; + const registryV2Instance = await ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registryProxyAddress); + const opUSDCgrowAddress = await (await deployments.get("opUSDCgrow")).address; // fetches proxy address + const strategyProviderAddress = await (await deployments.get("StrategyProvider")).address; + + const opUSDCgrowInstance = await ethers.getContractAt("Vault", opUSDCgrowAddress); + const financeOperatorSigner = await ethers.getSigner(await registryV2Instance.financeOperator()); + const operatorSigner = await ethers.getSigner(await registryV2Instance.operator()); + const governanceSigner = await ethers.getSigner(await registryV2Instance.governance()); + + console.log("set risk profile code for opUSDCgrow"); + console.log("\n"); + const _vaultConfiguration_ = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedRiskProfileCode.eq(getRiskProfileCode(_vaultConfiguration_))) { + console.log("risk profile code is as expected"); + console.log("\n"); + } else { + console.log("Governance setting risk profile code for opUSDCgrow.."); + console.log("\n"); + const tx1 = await opUSDCgrowInstance.connect(governanceSigner).setRiskProfileCode(expectedRiskProfileCode); + await tx1.wait(1); + } + + console.log("vaultConfiguration for opUSDCgrow"); + console.log("\n"); + + const _vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + if (expectedConfig.eq(_vaultConfiguration)) { + console.log("vaultConfiguration is as expected"); + console.log("\n"); + } else { + console.log("Governance setting vault configuration for opUSDCgrow.."); + console.log("\n"); + const tx2 = await opUSDCgrowInstance.connect(governanceSigner).setVaultConfiguration(expectedConfig); + await tx2.wait(1); + } + + console.log("Operator setting UnderlyingTokensHash..."); + console.log("\n"); + + const tokensHash = await opUSDCgrowInstance.underlyingTokensHash(); + + if (tokensHash != MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash) { + console.log("setting tokenshash.."); + console.log("\n"); + const tx3 = await opUSDCgrowInstance + .connect(operatorSigner) + .setUnderlyingTokensHash(MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash); + await tx3.wait(1); + } else { + console.log("Tokenshash is upto date"); + console.log("\n"); + } + + console.log("Finance operator setting opUSDCgrow config..."); + console.log("\n"); + + const actualUserDepositCapUT = await opUSDCgrowInstance.userDepositCapUT(); + const actualMinimumDepositValueUT = await opUSDCgrowInstance.minimumDepositValueUT(); + const actualTotalValueLockedLimitUT = await opUSDCgrowInstance.totalValueLockedLimitUT(); + + console.log("opUSDCgrow.setValueControlParams()"); + console.log("\n"); + if ( + expectedUserDepositCapUT.eq(actualUserDepositCapUT) && + expectedMinimumDepositValueUT.eq(actualMinimumDepositValueUT) && + expectedTotalValueLockedLimitUT.eq(actualTotalValueLockedLimitUT) + ) { + console.log("userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT is upto date on opUSDCgrow"); + console.log("\n"); + } else { + console.log("Updating userDepositCapUT , minimumDepositValueUT and totalValueLockedLimitUT on opUSDCgrow..."); + console.log("\n"); + const tx4 = await opUSDCgrowInstance + .connect(financeOperatorSigner) + .setValueControlParams(expectedUserDepositCapUT, expectedMinimumDepositValueUT, expectedTotalValueLockedLimitUT); + await tx4.wait(1); + } + + console.log("unpause opUSDCgrow"); + console.log("\n"); + const vaultConfiguration = await opUSDCgrowInstance.vaultConfiguration(); + const unpause = getUnpause(vaultConfiguration); + + if (!unpause) { + console.log("Governance unpausing opUSDCgrow vault..."); + console.log("\n"); + const tx5 = await opUSDCgrowInstance.connect(governanceSigner).setUnpaused(true); + await tx5.wait(1); + } else { + console.log("opUSDCgrow is already unpaused..."); + console.log("\n"); + } + + const strategyProviderInstance = await ethers.getContractAt( + ESSENTIAL_CONTRACTS.STRATEGY_PROVIDER, + strategyProviderAddress, + ); + const strategyOperatorSigner = await ethers.getSigner(await registryV2Instance.strategyOperator()); + + console.log("Operator setting best strategy for opUSDCgrow..."); + console.log("\n"); + + const currentBestStrategySteps = await strategyProviderInstance.getRpToTokenToBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash, + ); + const currentBestStrategyHash = await opUSDCgrowInstance.computeInvestStrategyHash(currentBestStrategySteps); + const expectedStrategySteps = StrategiesByTokenByChain[networkName].USDC[strategyName].strategy; + const expectedStrategyHash = await opUSDCgrowInstance.computeInvestStrategyHash( + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + + if (currentBestStrategyHash !== expectedStrategyHash) { + console.log("Strategy operator setting best strategy.."); + console.log("\n"); + const tx7 = await strategyProviderInstance.connect(strategyOperatorSigner).setBestStrategy( + expectedRiskProfileCode, + MULTI_CHAIN_VAULT_TOKENS[networkName].USDC.hash, + expectedStrategySteps.map(x => ({ + pool: x.contract, + outputToken: x.outputToken, + isBorrow: x.isBorrow, + })), + ); + await tx7.wait(1); + } else { + console.log("best strategy is upto date."); + console.log("\n"); + } + console.log("Next Best Strategy ", await opUSDCgrowInstance.getNextBestInvestStrategy()); +}; +export default func; +func.tags = ["MumbaiConfigopUSDCgrow"]; +func.dependencies = ["MumbaiopUSDCgrow", "MumbaiApproveAndMapLiquidityPoolToAdapter", "StrategyProvider"]; diff --git a/tsconfig.json b/tsconfig.json index 82793183f..0f66ed3e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,9 +25,9 @@ "typechain/**/*.d.ts", "typechain/**/*.ts", "optyfi-sdk/**/*.ts", - "deploy_kovan/*.ts", - "deploy_polygon/*.ts", - "deploy_mumbai/*.ts", + "deploy_kovan/**/*.ts", + "deploy_polygon/**/*.ts", + "deploy_mumbai/**/*.ts", "deploy/**/*.ts", "deploy_mainnet/**/*.ts", "scripts/*.ts" From 6e65b1a1624f7059c82d62809bae3e0408bd2f4c Mon Sep 17 00:00:00 2001 From: leodinh Date: Tue, 5 Apr 2022 23:03:46 -0400 Subject: [PATCH 39/52] feat: added new scenarios --- test/test-opty/4_vaultv2_strategies.spec.ts | 89 +++++++++++++-------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index a6aef1ec9..041fd1406 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -62,6 +62,24 @@ describe("VaultV2", () => { params: [financeOperatorAddress], }); const financeOperator = await ethers.getSigner(financeOperatorAddress); + + // (0-15) Deposit fee UT = 0 UT = 0000 + // (16-31) Deposit fee % = 0% = 0000 + // (32-47) Withdrawal fee UT = 0 UT = 0000 + // (48-63) Withdrawal fee % = 0% = 0000 + // (64-79) Max vault value jump % = 1% = 0064 + // (80-239) vault fee address = 0000000000000000000000000000000000000000 + // (240-247) risk profile code = 1 = 01 + // (248) emergency shutdown = false = 0 + // (249) unpause = true = 1 + // (250) allow whitelisted state = false = 0 + // (251) - 0 + // (252) - 0 + // (253) - 0 + // (254) - 0 + // (255) - 0 + // 0x0201000000000000000000000000000000000000000000640000000000000000 + // 906392544231311161076231617881117198619499239097192527361058388634069106688 const expectedConfig = ethers.BigNumber.from( "906392544231311161076231617881117198619499239097192527361058388634069106688", ); @@ -163,18 +181,6 @@ describe("VaultV2", () => { describe(`${strategy}`, () => { before(async function () { - const approveLqPoolList = []; - for (let i = 0; i < strategyDetail.strategy.length; i++) { - const pool = strategyDetail.strategy[i]; - if (pool.adapterName) { - approveLqPoolList.push([pool.contract, (await deployments.get(pool.adapterName)).address]); - } - } - if (approveLqPoolList.length > 0) { - await (this.registry as any)["approveLiquidityPoolAndMapToAdapter((address,address)[])"]( - approveLqPoolList, - ); - } await (this.strategyProvider as any).setBestStrategy( 1, tokenHash, @@ -195,18 +201,28 @@ describe("VaultV2", () => { ); expect(await this.vaults[token].investStrategyHash()).to.eq(strategyHash); }); - it(`alice deposit.Afterwards, should deposit to strategy successfully`, async function () { + it(`alice and bob should deposit into Vault successfully`, async function () { const _userDepositInDecimals = await this.vaults[token].minimumDepositValueUT(); const _userDeposit = new BN(_userDepositInDecimals.toString()) .div(new BN(to_10powNumber_BN(await this.vaults[token].decimals()).toString())) .toString(); await setTokenBalanceInStorage(this.token, this.signers.alice.address, _userDeposit); + await setTokenBalanceInStorage(this.token, this.signers.bob.address, _userDeposit); + await this.token.connect(this.signers.alice).approve(this.vaults[token].address, _userDepositInDecimals); - const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); + await this.token.connect(this.signers.bob).approve(this.vaults[token].address, _userDepositInDecimals); + + const aliceBalanceBefore = await this.token.balanceOf(this.signers.alice.address); await this.vaults[token].connect(this.signers.alice).userDepositVault(_userDepositInDecimals, [], []); - const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); - expect(userBalanceBefore).gt(userBalanceAfter); + const aliceBalanceAfter = await this.token.balanceOf(this.signers.alice.address); + expect(aliceBalanceBefore).gt(aliceBalanceAfter); + const bobBalanceBefore = await this.token.balanceOf(this.signers.bob.address); + await this.vaults[token].connect(this.signers.bob).userDepositVault(_userDepositInDecimals, [], []); + const bobBalanceAfter = await this.token.balanceOf(this.signers.bob.address); + expect(bobBalanceBefore).gt(bobBalanceAfter); + }); + it(`vault should deposit successfully to strategy after vaultDepositAllToStrategy()`, async function () { const vaultBalanceBefore = await this.vaults[token].balanceUT(); const poolBalanceBefore = await getLastStrategyStepBalanceLP( steps as StrategyStepType[], @@ -225,25 +241,28 @@ describe("VaultV2", () => { expect(vaultBalanceBefore).gt(vaultBalanceAfter); expect(poolBalanceBefore).lt(poolBalanceAfter); }); - it(`alice withdraw. Should withdraw from strategy successfully`, async function () { - const userWithdrawBalance = await this.vaults[token].balanceOf(this.signers.alice.address); - const userBalanceBefore = await this.token.balanceOf(this.signers.alice.address); - const poolBalanceBefore = await getLastStrategyStepBalanceLP( - steps as StrategyStepType[], - this.registry, - this.vaults[token], - this.token, - ); - await this.vaults[token].connect(this.signers.alice).userWithdrawVault(userWithdrawBalance, [], []); - const userBalanceAfter = await this.token.balanceOf(this.signers.alice.address); - const poolBalanceAfter = await getLastStrategyStepBalanceLP( - steps as StrategyStepType[], - this.registry, - this.vaults[token], - this.token, - ); - expect(userBalanceBefore).lt(userBalanceAfter); - expect(poolBalanceBefore).gt(poolBalanceAfter); + it(`alice and bob should be able to withdraw successfully, vault should withdraw from the current strategy successfully`, async function () { + const signers = [this.signers.alice, this.signers.bob]; + for (let i = 0; i < signers.length; i++) { + const userWithdrawBalance = await this.vaults[token].balanceOf(signers[i].address); + const userBalanceBefore = await this.token.balanceOf(signers[i].address); + const poolBalanceBefore = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, + ); + await this.vaults[token].connect(signers[i]).userWithdrawVault(userWithdrawBalance, [], []); + const userBalanceAfter = await this.token.balanceOf(signers[i].address); + const poolBalanceAfter = await getLastStrategyStepBalanceLP( + steps as StrategyStepType[], + this.registry, + this.vaults[token], + this.token, + ); + expect(userBalanceBefore).lt(userBalanceAfter); + expect(poolBalanceBefore).gt(poolBalanceAfter); + } }); }); } From 07569b7de3ce5501e2331881865def0d1989e905 Mon Sep 17 00:00:00 2001 From: leodinh Date: Wed, 6 Apr 2022 12:08:15 -0400 Subject: [PATCH 40/52] refactor: removed todo --- test/test-opty/4_vaultv2_strategies.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test-opty/4_vaultv2_strategies.spec.ts b/test/test-opty/4_vaultv2_strategies.spec.ts index 041fd1406..9179a1063 100644 --- a/test/test-opty/4_vaultv2_strategies.spec.ts +++ b/test/test-opty/4_vaultv2_strategies.spec.ts @@ -49,7 +49,6 @@ describe("VaultV2", () => { this.vaults["WMATIC"] = await ethers.getContractAt(ESSENTIAL_CONTRACTS.VAULT, opWMATICGrow.address); } - //TODO Remove if config opVaultGrow development script is done. const governanceAddress = await this.registry.getGovernance(); await network.provider.request({ method: "hardhat_impersonateAccount", From f8f42a3f58aac1966f244409112a7a6129720a3f Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 6 Apr 2022 18:08:01 -0400 Subject: [PATCH 41/52] refactor(adapter): bump up defi-adapter and sushiswap_pool_adapter --- contracts/protocol/adapters/defi-adapters | 2 +- contracts/protocol/adapters/polygon/sushiswap_pools_adapter | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/protocol/adapters/defi-adapters b/contracts/protocol/adapters/defi-adapters index 93d8e56ab..17cf95725 160000 --- a/contracts/protocol/adapters/defi-adapters +++ b/contracts/protocol/adapters/defi-adapters @@ -1 +1 @@ -Subproject commit 93d8e56ab2c691eb8dd74fd82bbc2338011fc1d5 +Subproject commit 17cf95725524dbc3db2ce0bafd77e9e9dfe22481 diff --git a/contracts/protocol/adapters/polygon/sushiswap_pools_adapter b/contracts/protocol/adapters/polygon/sushiswap_pools_adapter index 22a0dc4b4..0d6649fd1 160000 --- a/contracts/protocol/adapters/polygon/sushiswap_pools_adapter +++ b/contracts/protocol/adapters/polygon/sushiswap_pools_adapter @@ -1 +1 @@ -Subproject commit 22a0dc4b4ad77bc092ee4f28ee61d0f1a1dea8cb +Subproject commit 0d6649fd1baf7d501228510e071123cabbbfb96c From 8218d97ebef72844657fed8e57aeecc8fadfe84a Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 6 Apr 2022 20:27:22 -0400 Subject: [PATCH 42/52] =?UTF-8?q?chore(deploy):=20mumbai=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployments/mumbai/.chainId | 1 + deployments/mumbai/AaveAdapter.json | 901 +++++++ deployments/mumbai/Registry.json | 2142 +++++++++++++++++ deployments/mumbai/RegistryProxy.json | 1338 ++++++++++ deployments/mumbai/RiskManager.json | 188 ++ deployments/mumbai/RiskManagerProxy.json | 175 ++ deployments/mumbai/StrategyProvider.json | 420 ++++ deployments/mumbai/opUSDCgrow.json | 1492 ++++++++++++ .../mumbai/opUSDCgrow_Implementation.json | 1320 ++++++++++ deployments/mumbai/opUSDCgrow_Proxy.json | 232 ++ .../2db89642daf7ebd20cbbef9f4540b20d.json | 39 + hardhat.config.ts | 1 + 12 files changed, 8249 insertions(+) create mode 100644 deployments/mumbai/.chainId create mode 100644 deployments/mumbai/AaveAdapter.json create mode 100644 deployments/mumbai/Registry.json create mode 100644 deployments/mumbai/RegistryProxy.json create mode 100644 deployments/mumbai/RiskManager.json create mode 100644 deployments/mumbai/RiskManagerProxy.json create mode 100644 deployments/mumbai/StrategyProvider.json create mode 100644 deployments/mumbai/opUSDCgrow.json create mode 100644 deployments/mumbai/opUSDCgrow_Implementation.json create mode 100644 deployments/mumbai/opUSDCgrow_Proxy.json create mode 100644 deployments/mumbai/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json diff --git a/deployments/mumbai/.chainId b/deployments/mumbai/.chainId new file mode 100644 index 000000000..d7e2f72ce --- /dev/null +++ b/deployments/mumbai/.chainId @@ -0,0 +1 @@ +80001 \ No newline at end of file diff --git a/deployments/mumbai/AaveAdapter.json b/deployments/mumbai/AaveAdapter.json new file mode 100644 index 000000000..fc3e7c013 --- /dev/null +++ b/deployments/mumbai/AaveAdapter.json @@ -0,0 +1,901 @@ +{ + "address": "0x2A68c377a4bca734746D8d1acd6e58dfC4cBD55F", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "PROTOCOL_DATA_PROVIDER_ID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WMATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_codes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolToken", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "incentivesController", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapV2Router02", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8acff55801281f56ef13e3774d679d6f09d576ca640d7ad676bd6da26e5c15ee", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x2A68c377a4bca734746D8d1acd6e58dfC4cBD55F", + "transactionIndex": 0, + "gasUsed": "2021538", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0xb0c4634322da206661ac182f71a6b9726d9ef0ed67beae34d88f8c15de044594", + "transactionHash": "0x8acff55801281f56ef13e3774d679d6f09d576ca640d7ad676bd6da26e5c15ee", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826467, + "transactionHash": "0x8acff55801281f56ef13e3774d679d6f09d576ca640d7ad676bd6da26e5c15ee", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000001d2d3939643364e00000000000000000000000000000000000000000000000007191136dbfda000000000000000000000000000000000000000000000000a14058c95dd2eb33b0200000000000000000000000000000000000000000000000005463da345ba69b2000000000000000000000000000000000000000000000a14075f6970c4f67150", + "logIndex": 0, + "blockHash": "0xb0c4634322da206661ac182f71a6b9726d9ef0ed67beae34d88f8c15de044594" + } + ], + "blockNumber": 25826467, + "cumulativeGasUsed": "2021538", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b50604051620023663803806200236683398101604081905261003191610064565b600080546127106001556001600160a01b03929092166001600160a81b031990921691909117600160a01b179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b6122c280620000a46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a" +} diff --git a/deployments/mumbai/Registry.json b/deployments/mumbai/Registry.json new file mode 100644 index 000000000..872c70031 --- /dev/null +++ b/deployments/mumbai/Registry.json @@ -0,0 +1,2142 @@ +{ + "address": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_riskProfileCodes", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "_names", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "_symbols", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "_canBorrow", + "type": "bool[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange[]", + "name": "_poolRatingRanges", + "type": "tuple[]" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryProxy", + "name": "_registryProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFinanceOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getHarvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "internalType": "struct DataTypes.LiquidityPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getODEFIVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOPTYDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "getRiskProfile", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "poolRatingsRange", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct DataTypes.RiskProfile", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskProfileList", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenHashes", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getTokensHashByIndex", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashIndexByHash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashToTokenList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "isApprovedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "removeRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_harvestCodeProvider", + "type": "address" + } + ], + "name": "setHarvestCodeProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_odefiVaultBooster", + "type": "address" + } + ], + "name": "setODEFIVaultBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_opty", + "type": "address" + } + ], + "name": "setOPTY", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskManager", + "type": "address" + } + ], + "name": "setRiskManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyProvider", + "type": "address" + } + ], + "name": "setStrategyProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "updateRPPoolRatings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + } + ], + "name": "updateRiskProfileBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x29a70465a103b228bd43a8b05991e40838da5d3edcf6777cf05e48e31aac4127", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "transactionIndex": 0, + "gasUsed": "3504759", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x0f99a3e2cb56ecee0f1f0d2850255abf4d7e9d5accef0e63af5388b531e96642", + "transactionHash": "0x29a70465a103b228bd43a8b05991e40838da5d3edcf6777cf05e48e31aac4127", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826446, + "transactionHash": "0x29a70465a103b228bd43a8b05991e40838da5d3edcf6777cf05e48e31aac4127", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x0000000000000000000000000000000000000000000000000329576216e522e30000000000000000000000000000000000000000000000000cbf8023bd98f800000000000000000000000000000000000000000000000a13e8be5fb619caf3b7000000000000000000000000000000000000000000000000099628c1a6b3d51d000000000000000000000000000000000000000000000a13ebe7b71830b0169a", + "logIndex": 0, + "blockHash": "0x0f99a3e2cb56ecee0f1f0d2850255abf4d7e9d5accef0e63af5388b531e96642" + } + ], + "blockNumber": 25826446, + "cumulativeGasUsed": "3504759", + "status": 1, + "byzantium": true + }, + "args": [], + "bytecode": "0x608060405234801561001057600080fd5b50613e67806100206000396000f3fe608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/mumbai/RegistryProxy.json b/deployments/mumbai/RegistryProxy.json new file mode 100644 index 000000000..b3f62a5d7 --- /dev/null +++ b/deployments/mumbai/RegistryProxy.json @@ -0,0 +1,1338 @@ +{ + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newGovernance", + "type": "address" + } + ], + "name": "NewGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "NewPendingGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptGovernance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "setPendingGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "transactionIndex": 0, + "gasUsed": "1252404", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000001000001000000000010000108000000000000000000000000000004000000000000000000000000000800000000000000008000100000110000000000000000000000000000000000000040000000000000080000000000000000000000000000000000000000000020000000000000080000000000000000000200000000008000020000000000000000041000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000840000000000002000000000000000000000000000000000000002000100000", + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0", + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826444, + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0" + }, + { + "transactionIndex": 0, + "blockNumber": 25826444, + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0" + }, + { + "transactionIndex": 0, + "blockNumber": 25826444, + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f15225380", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0" + }, + { + "transactionIndex": 0, + "blockNumber": 25826444, + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac076", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0" + }, + { + "transactionIndex": 0, + "blockNumber": 25826444, + "transactionHash": "0x7729b358be15207f47c23c25e534df7b89ae7929dba2eddd79b160c014346446", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x0000000000000000000000000000000000000000000000000121368fe8f8d1c40000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000a13e47fba428806022b0000000000000000000000000000000000000000000000000cbf8023be6b2e3c000000000000000000000000000000000000000000000a13e5a0f0d270fed3ef", + "logIndex": 4, + "blockHash": "0x314a17714f0874284f334c1857cb62efb7d6734ca24c99218dfc7e82cd3950f0" + } + ], + "blockNumber": 25826444, + "cumulativeGasUsed": "1252404", + "status": 1, + "byzantium": true + }, + "args": [], + "bytecode": "0x60806040523480156200001157600080fd5b50600080546001600160a01b03191633908117909155620000329062000059565b6200003d3362000145565b620000483362000231565b62000053336200031d565b62000409565b6000546001600160a01b03163314620000a8576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620000f2576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b6000546001600160a01b0316331462000194576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620001de576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331462000280576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620002ca576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6000546001600160a01b031633146200036c576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620003b6576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b61134480620004196000396000f3fe6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500", + "deployedBytecode": "0x6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a" +} diff --git a/deployments/mumbai/RiskManager.json b/deployments/mumbai/RiskManager.json new file mode 100644 index 000000000..79421a18a --- /dev/null +++ b/deployments/mumbai/RiskManager.json @@ -0,0 +1,188 @@ +{ + "address": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "contract RiskManagerProxy", + "name": "_riskManagerProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb4518ee4bfe66b4d04ff27d92d2ba1a05c468342e2ccf5e7ec954db66383d81b", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "transactionIndex": 0, + "gasUsed": "1043442", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x196eac55bf39f6e88a1a3177772f88a1eff23bf231f9f8e8a2006eaa0e1d4c1c", + "transactionHash": "0xb4518ee4bfe66b4d04ff27d92d2ba1a05c468342e2ccf5e7ec954db66383d81b", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826455, + "transactionHash": "0xb4518ee4bfe66b4d04ff27d92d2ba1a05c468342e2ccf5e7ec954db66383d81b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000f0f552b53ee4a800000000000000000000000000000000000000000000000008f86f25e094fe00000000000000000000000000000000000000000000000a13fb1078e560b50155000000000000000000000000000000000000000000000000080779d32b561958000000000000000000000000000000000000000000000a13fc016e3815f3e5fd", + "logIndex": 0, + "blockHash": "0x196eac55bf39f6e88a1a3177772f88a1eff23bf231f9f8e8a2006eaa0e1d4c1c" + } + ], + "blockNumber": 25826455, + "cumulativeGasUsed": "1043442", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b5060405161120a38038061120a83398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b611179806100916000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/mumbai/RiskManagerProxy.json b/deployments/mumbai/RiskManagerProxy.json new file mode 100644 index 000000000..af6f5a0f8 --- /dev/null +++ b/deployments/mumbai/RiskManagerProxy.json @@ -0,0 +1,175 @@ +{ + "address": "0x46F0FD86744AbF60D4beA64564EED55970e3a459", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xad9936e402b4c9e9bf8aa1fab704edae29eb1f3e8d4fc17d29b7179fa44ec3b3", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x46F0FD86744AbF60D4beA64564EED55970e3a459", + "transactionIndex": 0, + "gasUsed": "398206", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x5903b61aac15d02d1c06ee7534ad6cee9d8e5863f08ceced9e356ff39b17505a", + "transactionHash": "0xad9936e402b4c9e9bf8aa1fab704edae29eb1f3e8d4fc17d29b7179fa44ec3b3", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826453, + "transactionHash": "0xad9936e402b4c9e9bf8aa1fab704edae29eb1f3e8d4fc17d29b7179fa44ec3b3", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000005bf4ce5a3f8218000000000000000000000000000000000000000000000000095463f43b1d6a00000000000000000000000000000000000000000000000a13f8426b63822b6bfb00000000000000000000000000000000000000000000000008f86f25e0dde7e8000000000000000000000000000000000000000000000a13f89e6031dc6aee13", + "logIndex": 0, + "blockHash": "0x5903b61aac15d02d1c06ee7534ad6cee9d8e5863f08ceced9e356ff39b17505a" + } + ], + "blockNumber": 25826453, + "cumulativeGasUsed": "398206", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b506040516106333803806106338339818101604052602081101561003357600080fd5b5051600280546001600160a01b0319166001600160a01b039092169190911790556105d0806100636000396000f3fe6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a", + "deployedBytecode": "0x6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a" +} diff --git a/deployments/mumbai/StrategyProvider.json b/deployments/mumbai/StrategyProvider.json new file mode 100644 index 000000000..bb507a97b --- /dev/null +++ b/deployments/mumbai/StrategyProvider.json @@ -0,0 +1,420 @@ +{ + "address": "0xc3Ae5186FcCb1971eAb1579A9E49988CEadF0936", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToDefaultStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToBestStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToDefaultStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestDefaultStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "_vaultRewardStrategy", + "type": "tuple" + } + ], + "name": "setVaultRewardStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "vaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x749f8bbac0c21f5060527ce30415ee6d72feeeb0b4cbe3ec000b52e03ad06cc7", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xc3Ae5186FcCb1971eAb1579A9E49988CEadF0936", + "transactionIndex": 0, + "gasUsed": "797383", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0xfa927a812aa49fd035a0357e9f450ee8be8159508f1fe1b71dcdbf70305ccfb0", + "transactionHash": "0x749f8bbac0c21f5060527ce30415ee6d72feeeb0b4cbe3ec000b52e03ad06cc7", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826463, + "transactionHash": "0x749f8bbac0c21f5060527ce30415ee6d72feeeb0b4cbe3ec000b52e03ad06cc7", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000b82303cfbeda3a00000000000000000000000000000000000000000000000007de55ced9be1c00000000000000000000000000000000000000000000000a1402390b34824aa5be000000000000000000000000000000000000000000000000072632cb09ff41c6000000000000000000000000000000000000000000000a1402f12e3852097ff8", + "logIndex": 0, + "blockHash": "0xfa927a812aa49fd035a0357e9f450ee8be8159508f1fe1b71dcdbf70305ccfb0" + } + ], + "blockNumber": 25826463, + "cumulativeGasUsed": "797383", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b50604051610d96380380610d9683398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610d05806100916000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/mumbai/opUSDCgrow.json b/deployments/mumbai/opUSDCgrow.json new file mode 100644 index 000000000..8cedfa8d2 --- /dev/null +++ b/deployments/mumbai/opUSDCgrow.json @@ -0,0 +1,1492 @@ +{ + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + }, + { + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x72aba46f25C4c270d20c575D023627B45E307446", + "transactionIndex": 0, + "gasUsed": "825168", + "logsBloom": "0x00000000000008000000000000000000000000000000000400800000000000000000000000000000001400000000000000008000008000000000000000000000000000000000000000000000000000800001000000000000000100000000004008000000020000000000000000000800000000000000010080000000000000400000000000000000000000000000000000000020000080000000000000000000200000000000000000000000000200000000000000000000000000000000004000000000000000000001000000000000000000000000000400100040000020020000000000000000200400000000000000000000000000000000002000100000", + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1", + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e4e888d767823c44c3f3f9e879fb843b961fcfe" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + }, + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + }, + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" + ], + "data": "0x00000000000000000000000000000000000000000000000000be8d95c65bce30000000000000000000000000000000000000000000000000070af0b440877200000000000000000000000000000000000000000000000ee5a6efc85896a4bbbc000000000000000000000000000000000000000000000000064c631e7a2ba3d0000000000000000000000000000000000000000000000ee5a7ae55ee5d0089ec", + "logIndex": 2, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + } + ], + "blockNumber": 25826498, + "cumulativeGasUsed": "825168", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc929d122f2ee0e0a6364f59c9c9f4f01383050c42ebefae1b80ae28b1bc9d8fe00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "execute": { + "methodName": "initialize", + "args": [ + "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "0xc929d122f2ee0e0a6364f59c9c9f4f01383050c42ebefae1b80ae28b1bc9d8fe", + "USDC Coin (PoS)", + "USDC", + "1" + ] + }, + "implementation": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/mumbai/opUSDCgrow_Implementation.json b/deployments/mumbai/opUSDCgrow_Implementation.json new file mode 100644 index 000000000..ebcf3bc98 --- /dev/null +++ b/deployments/mumbai/opUSDCgrow_Implementation.json @@ -0,0 +1,1320 @@ +{ + "address": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileName", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileSymbol", + "type": "string" + } + ], + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x9aa154e246418d468438b759ff57ba533b6e6d61c4f576ec627a58561857993b", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "transactionIndex": 0, + "gasUsed": "5460356", + "logsBloom": "0x00000000000000020000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x58bde772313844f6134754e3f9f6c3f854899a29d34f72ed127d4838392e834e", + "transactionHash": "0x9aa154e246418d468438b759ff57ba533b6e6d61c4f576ec627a58561857993b", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826475, + "transactionHash": "0x9aa154e246418d468438b759ff57ba533b6e6d61c4f576ec627a58561857993b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000004ecf0b71f564a5c000000000000000000000000000000000000000000000000050786118f199a00000000000000000000000000000000000000000000000a140cccef8b81f42da9000000000000000000000000000000000000000000000000001a955a6fc34fa4000000000000000000000000000000000000000000000a1411b9e042a14a7805", + "logIndex": 0, + "blockHash": "0x58bde772313844f6134754e3f9f6c3f854899a29d34f72ed127d4838392e834e" + } + ], + "blockNumber": 25826475, + "cumulativeGasUsed": "5460356", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", "USD Coin (PoS)", "USDC", "Growth", "grow"], + "bytecode": "0x6080604052600080553480156200001557600080fd5b50604051620063823803806200638283398101604081905262000038916200020f565b8484836040516020016200004e92919062000327565b604051602081830303815290604052848360405160200162000072929190620002e3565b60408051601f19818403018152919052815162000097906037906020850190620000f2565b508051620000ad906038906020840190620000f2565b5050603980546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550506001603a5550620003a992505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013557805160ff191683800117855562000165565b8280016001018555821562000165579182015b828111156200016557825182559160200191906001019062000148565b506200017392915062000177565b5090565b5b8082111562000173576000815560010162000178565b600082601f8301126200019f578081fd5b81516001600160401b0380821115620001b6578283fd5b604051601f8301601f191681016020018281118282101715620001d7578485fd5b604052828152925082848301602001861015620001f357600080fd5b6200020683602083016020880162000376565b50505092915050565b600080600080600060a0868803121562000227578081fd5b85516001600160a01b03811681146200023e578182fd5b60208701519095506001600160401b03808211156200025b578283fd5b6200026989838a016200018e565b955060408801519150808211156200027f578283fd5b6200028d89838a016200018e565b94506060880151915080821115620002a3578283fd5b620002b189838a016200018e565b93506080880151915080821115620002c7578283fd5b50620002d6888289016200018e565b9150509295509295909350565b60006106f760f41b825283516200030281600285016020880162000376565b8351908301906200031b81600284016020880162000376565b01600201949350505050565b600062037b8160ed1b825283516200034781600385016020880162000376565b600160fd1b60039184019182015283516200036a81600484016020880162000376565b01600401949350505050565b60005b838110156200039357818101518382015260200162000379565b83811115620003a3576000848401525b50505050565b615fc980620003b96000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a" +} diff --git a/deployments/mumbai/opUSDCgrow_Proxy.json b/deployments/mumbai/opUSDCgrow_Proxy.json new file mode 100644 index 000000000..ed5aeec54 --- /dev/null +++ b/deployments/mumbai/opUSDCgrow_Proxy.json @@ -0,0 +1,232 @@ +{ + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + } + ], + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x72aba46f25C4c270d20c575D023627B45E307446", + "transactionIndex": 0, + "gasUsed": "825168", + "logsBloom": "0x00000000000008000000000000000000000000000000000400800000000000000000000000000000001400000000000000008000008000000000000000000000000000000000000000000000000000800001000000000000000100000000004008000000020000000000000000000800000000000000010080000000000000400000000000000000000000000000000000000020000080000000000000000000200000000000000000000000000200000000000000000000000000000000004000000000000000000001000000000000000000000000000400100040000020020000000000000000200400000000000000000000000000000000002000100000", + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1", + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000004e4e888d767823c44c3f3f9e879fb843b961fcfe" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + }, + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + }, + { + "transactionIndex": 0, + "blockNumber": 25826498, + "transactionHash": "0x4a22c118c455b663576430c8998127ecb87013f174b6e702406b1b6093005d59", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" + ], + "data": "0x00000000000000000000000000000000000000000000000000be8d95c65bce30000000000000000000000000000000000000000000000000070af0b440877200000000000000000000000000000000000000000000000ee5a6efc85896a4bbbc000000000000000000000000000000000000000000000000064c631e7a2ba3d0000000000000000000000000000000000000000000000ee5a7ae55ee5d0089ec", + "logIndex": 2, + "blockHash": "0x68bac6d3f6854210d7ebe9513ce2cb8159926c80dc0dda8818a045fdcb2a95f1" + } + ], + "blockNumber": 25826498, + "cumulativeGasUsed": "825168", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc929d122f2ee0e0a6364f59c9c9f4f01383050c42ebefae1b80ae28b1bc9d8fe00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/mumbai/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json b/deployments/mumbai/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json new file mode 100644 index 000000000..965551510 --- /dev/null +++ b/deployments/mumbai/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json @@ -0,0 +1,39 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.7/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setOwner(ownerAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\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 transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.7/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\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) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\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" + }, + "solc_0.7/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index 1afb69954..54bb401c4 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -60,6 +60,7 @@ const getCommonNetworkConfig = (rpcUrl: string, networkName: eEVMNetwork, networ chainId: networkId, deploy: [`deploy`, `deploy_${NETWORK_NAME}`], timeout: 100000, + accounts: process.env.PK?.split(","), }); const config: HardhatUserConfig = { From 8fe098e5fc467df7aafccd0dccb1e871c90abc86 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 6 Apr 2022 20:44:03 -0400 Subject: [PATCH 43/52] refactor(tasks): add vault deposit all to strategy --- cli.md | 2 +- tasks/actions/vault-actions.ts | 42 ++++++++++++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/cli.md b/cli.md index 03bd3dcde..40dbeb056 100644 --- a/cli.md +++ b/cli.md @@ -390,7 +390,7 @@ Usage: perform actions in the vault contract Options: --vault required
the address of vault --user required
account address of the user ---action required "DEPOSIT" || "WITHDRAW" || "REBALANCE" +--action required "DEPOSIT" || "WITHDRAW" || "REBALANCE" || "VAULT-DEPOSIT-ALL-TO-STRATEGY" --merkle-proof required merkle proofs in stringified form --useall optional use whole balance (default: false) --amount optional amount of token (default: 0) diff --git a/tasks/actions/vault-actions.ts b/tasks/actions/vault-actions.ts index 0f1b4229b..5cc8296de 100644 --- a/tasks/actions/vault-actions.ts +++ b/tasks/actions/vault-actions.ts @@ -9,13 +9,18 @@ import { getAllowWhitelistState } from "../../helpers/utils"; task(TASKS.ACTION_TASKS.VAULT_ACTIONS.NAME, TASKS.ACTION_TASKS.VAULT_ACTIONS.DESCRIPTION) .addParam("vault", "the address of vault", "", types.string) - .addParam("action", "deposit, withdraw or rebalance", "DEPOSIT" || "WITHDRAW" || "REBALANCE", types.string) + .addParam( + "action", + "deposit, withdraw or rebalance", + "DEPOSIT" || "WITHDRAW" || "REBALANCE" || "VAULT-DEPOSIT-ALL-TO-STRATEGY", + types.string, + ) .addParam("user", "account address of the user", "", types.string) .addParam("merkleProof", "user merkle proof", "", types.string) .addOptionalParam("useall", "use whole balance", false, types.boolean) .addOptionalParam("amount", "amount of token", 0, types.int) .setAction(async ({ vault, action, user, amount, useall, merkleProof }, hre) => { - const ACTIONS = ["DEPOSIT", "WITHDRAW", "REBALANCE"]; + const ACTIONS = ["DEPOSIT", "WITHDRAW", "REBALANCE", "VAULT-DEPOSIT-ALL-TO-STRATEGY"]; if (vault === "") { throw new Error("vault cannot be empty"); } @@ -229,6 +234,39 @@ task(TASKS.ACTION_TASKS.VAULT_ACTIONS.NAME, TASKS.ACTION_TASKS.VAULT_ACTIONS.DES } break; } + case "VAULT-DEPOSIT-ALL-TO-STRATEGY": { + try { + let strategyHash = await vaultContract.investStrategyHash(); + console.log(`Invest strategy : ${strategyHash}`); + console.log("Depositing all to strategy.."); + console.log("Block before : ", await hre.ethers.provider.getBlockNumber()); + console.log( + "total supply before : ", + hre.ethers.utils.formatUnits(await vaultContract.totalSupply(), tokenDecimals), + ); + console.log( + "Price per full share before : ", + hre.ethers.utils.formatEther(await vaultContract.getPricePerFullShare()), + ); + const tx3 = await vaultContract.connect(userSigner).vaultDepositAllToStrategy(); + await tx3.wait(1); + console.log("Block after : ", await hre.ethers.provider.getBlockNumber()); + console.log( + "total supply after : ", + hre.ethers.utils.formatUnits(await vaultContract.totalSupply(), tokenDecimals), + ); + console.log( + "Price per full share after : ", + hre.ethers.utils.formatEther(await vaultContract.getPricePerFullShare()), + ); + strategyHash = await vaultContract.investStrategyHash(); + console.log(`Invest strategy : ${strategyHash}`); + console.log("vaultDepositAllToStrategy successfully"); + } catch (error) { + throw new Error(`#vaultDepositAllToStrategy : ${error}`); + } + break; + } } console.log("Finished executing Vault actions"); } catch (error) { From c20340e2cedcadf5e2ee73d8c643ef51aff17bcf Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Wed, 6 Apr 2022 20:46:38 -0400 Subject: [PATCH 44/52] refactor(lint): harvest scripts --- scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts b/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts index 5dbf7b446..027ceedfb 100644 --- a/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts +++ b/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts @@ -1,4 +1,3 @@ -import { BigNumber } from "ethers"; import { ethers } from "hardhat"; import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; import { ERC20, IUniswapV2Router02, Registry, Vault } from "../../typechain"; From bec7323cd4e9a677551fc4730238cdf53b055261 Mon Sep 17 00:00:00 2001 From: leodinh Date: Wed, 6 Apr 2022 23:00:02 -0400 Subject: [PATCH 45/52] refactor: changed deploy paths --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 82793183f..3b4c1b2d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,11 +25,11 @@ "typechain/**/*.d.ts", "typechain/**/*.ts", "optyfi-sdk/**/*.ts", + "deploy/*.ts", + "deploy_mainnet/*.ts", "deploy_kovan/*.ts", "deploy_polygon/*.ts", "deploy_mumbai/*.ts", - "deploy/**/*.ts", - "deploy_mainnet/**/*.ts", "scripts/*.ts" ] } From 2ccb2168af0765c2595571b7f96a0aa1c26f69e8 Mon Sep 17 00:00:00 2001 From: leodinh Date: Wed, 6 Apr 2022 23:13:53 -0400 Subject: [PATCH 46/52] feat: updated sushi repo --- contracts/protocol/adapters/polygon/sushiswap_pools_adapter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/protocol/adapters/polygon/sushiswap_pools_adapter b/contracts/protocol/adapters/polygon/sushiswap_pools_adapter index 22a0dc4b4..0d6649fd1 160000 --- a/contracts/protocol/adapters/polygon/sushiswap_pools_adapter +++ b/contracts/protocol/adapters/polygon/sushiswap_pools_adapter @@ -1 +1 @@ -Subproject commit 22a0dc4b4ad77bc092ee4f28ee61d0f1a1dea8cb +Subproject commit 0d6649fd1baf7d501228510e071123cabbbfb96c From 6ef605286640c8e57952d59fcb0da32e9c8f6af9 Mon Sep 17 00:00:00 2001 From: leodinh Date: Wed, 6 Apr 2022 23:37:51 -0400 Subject: [PATCH 47/52] refactor: fixed linting --- scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts b/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts index 5dbf7b446..027ceedfb 100644 --- a/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts +++ b/scripts/harvest/001_swap_SNX_CRV_CVX_to_USDC.ts @@ -1,4 +1,3 @@ -import { BigNumber } from "ethers"; import { ethers } from "hardhat"; import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; import { ERC20, IUniswapV2Router02, Registry, Vault } from "../../typechain"; From 0a193512da93912e203043257ecaac3201ab7e60 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 7 Apr 2022 20:15:23 -0400 Subject: [PATCH 48/52] feat(tasks): admin tasks --- cli.md | 158 ++++++++++++++++++ helper-hardhat-config.ts | 4 +- tasks/actions/accept-governance.ts | 35 ++++ tasks/actions/change-vault-proxy-v2-admin.ts | 104 ++++++++++++ tasks/actions/set-pending-governance.ts | 40 +++++ tasks/actions/transfer-finance-operator.ts | 37 ++++ tasks/actions/transfer-operation-ownership.ts | 36 ++++ tasks/actions/transfer-operator.ts | 37 ++++ tasks/actions/transfer-risk-operator.ts | 37 ++++ tasks/actions/transfer-strategy-operator.ts | 37 ++++ tasks/task-names.ts | 11 ++ 11 files changed, 534 insertions(+), 2 deletions(-) create mode 100644 tasks/actions/accept-governance.ts create mode 100644 tasks/actions/change-vault-proxy-v2-admin.ts create mode 100644 tasks/actions/set-pending-governance.ts create mode 100644 tasks/actions/transfer-finance-operator.ts create mode 100644 tasks/actions/transfer-operation-ownership.ts create mode 100644 tasks/actions/transfer-operator.ts create mode 100644 tasks/actions/transfer-risk-operator.ts create mode 100644 tasks/actions/transfer-strategy-operator.ts diff --git a/cli.md b/cli.md index 40dbeb056..a83db1dc7 100644 --- a/cli.md +++ b/cli.md @@ -591,3 +591,161 @@ Options: --vault 0x0000000000000000000000000000000000000000 \ --block-number 1234567 ``` + +### change-vault-proxy-v2-admin + +``` +Usage: change vault proxy admin + +Options: +--vault required
the address of vault +--new-admin required the address of new admin +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` + yarn hardhat change-vault-proxy-v2-admin \ + --network localhost \ + --vault 0x0000000000000000000000000000000000000000 \ + --new-admin 0x0000000000000000000000000000000000000000 +``` + +### set-pending-governance + +``` +Usage: set pending governance + +Options: +--registry required
the address of registry +--new-pending-governance required the address of pending governance +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` + yarn hardhat set-pending-governance \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-pending-governance 0x0000000000000000000000000000000000000000 +``` + +### accept-pending-governance + +``` +Usage: accept pending governance + +Options: +--registry required
the address of registry +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` + yarn hardhat accept-pending-governance \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ +``` + +### transfer-operation-ownership + +``` +Usage: transfer all operator roles to same address + +Options: +--registry required
the address of registry +--new-operator required
the address of new operator +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` +yarn hardhat transfer-operation-ownership \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-operator 0x0000000000000000000000000000000000000000 \ +``` + +### transfer-operator + +``` +Usage: transfer operator + +Options: +--registry required
the address of registry +--new-operator required
the address of new finance operator +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` +yarn hardhat transfer-operator \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-operator 0x0000000000000000000000000000000000000000 \ +``` + +### transfer-finance-operator + +``` +Usage: transfer finance operator + +Options: +--registry required
the address of registry +--new-finance-operator required
the address of new finance operator +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` +yarn hardhat transfer-finance-operator \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-finance-operator 0x0000000000000000000000000000000000000000 \ +``` + +### transfer-risk-operator + +``` +Usage: transfer risk operator + +Options: +--registry required
the address of registry +--new-risk-operator required
the address of new risk operator +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` +yarn hardhat transfer-risk-operator \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-risk-operator 0x0000000000000000000000000000000000000000 \ +``` + +### transfer-strategy-operator + +``` +Usage: transfer strategy operator + +Options: +--registry required
the address of registry +--new-strategy-operator required
the address of new strategy operator +--network optional name of the network provider (default: hardhat) +``` + +- Example: + +``` +yarn hardhat transfer-strategy-operator \ + --network localhost \ + --registry 0x0000000000000000000000000000000000000000 \ + --new-strategy-operator 0x0000000000000000000000000000000000000000 \ +``` diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index 7635cdc6f..8c878d869 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -65,9 +65,9 @@ export const NETWORKS_DEFAULT_GAS: iEVMParamsPerNetwork = { [eEVMNetwork.mainnet]: "auto", [eEVMNetwork.hardhat]: "auto", [eEVMNetwork.staging]: "auto", - [eEVMNetwork.polygon]: 65 * GWEI, + [eEVMNetwork.polygon]: 30 * GWEI, [eEVMNetwork.avalanche]: 65 * GWEI, - [eEVMNetwork.mumbai]: 65 * GWEI, + [eEVMNetwork.mumbai]: 30 * GWEI, [eEVMNetwork.ganache]: "auto", [eEVMNetwork.dashboard]: "auto", [eEVMNetwork.tenderly]: 65 * GWEI, diff --git a/tasks/actions/accept-governance.ts b/tasks/actions/accept-governance.ts new file mode 100644 index 000000000..724362ea1 --- /dev/null +++ b/tasks/actions/accept-governance.ts @@ -0,0 +1,35 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { RegistryProxy } from "../../typechain"; + +task(TASKS.ACTION_TASKS.ACCEPT_GOVERNANCE.NAME, TASKS.ACTION_TASKS.ACCEPT_GOVERNANCE.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .setAction(async ({ registry }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + try { + const registryProxyInstance = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registry) + ); + const currentPendingGovernance = await registryProxyInstance.pendingGovernance(); + console.log("current pending governance ", currentPendingGovernance); + const currentGovernance = await registryProxyInstance.governance(); + console.log("current governance ", currentGovernance); + if (getAddress(currentPendingGovernance) != hre.ethers.constants.AddressZero) { + const currentPendingGovernanceSigner = await hre.ethers.getSigner(currentPendingGovernance); + const tx = await registryProxyInstance.connect(currentPendingGovernanceSigner).acceptGovernance(); + await tx.wait(1); + const actualNewGovernance = await registryProxyInstance.governance(); + console.log("The new governance is ", actualNewGovernance); + } else { + console.log("please set pending governance first"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.ACCEPT_GOVERNANCE.NAME}: `, error); + } + }); diff --git a/tasks/actions/change-vault-proxy-v2-admin.ts b/tasks/actions/change-vault-proxy-v2-admin.ts new file mode 100644 index 000000000..fdb561ada --- /dev/null +++ b/tasks/actions/change-vault-proxy-v2-admin.ts @@ -0,0 +1,104 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; + +task(TASKS.ACTION_TASKS.CHANGE_VAULT_PROXY_V2_ADMIN.NAME, TASKS.ACTION_TASKS.CHANGE_VAULT_PROXY_V2_ADMIN.DESCRIPTION) + .addParam("vault", "the address of vault", "", types.string) + .addParam("newAdmin", "address of the new admin", "", types.string) + .setAction(async ({ vault, newAdmin }, hre) => { + if (!isAddress(vault)) { + throw new Error("vault address is invalid"); + } + + if (!isAddress(newAdmin)) { + throw new Error("new admin address is invalid"); + } + + try { + const vaultProxyInstance = await hre.ethers.getContractAt(EIP173_ABI, vault); + const currentAdmin = await vaultProxyInstance.owner(); + console.log("current admin ", currentAdmin); + if (getAddress(newAdmin) != getAddress(currentAdmin)) { + const currentAdminSigner = await hre.ethers.getSigner(currentAdmin); + const tx = await vaultProxyInstance.connect(currentAdminSigner).transferOwnership(newAdmin); + await tx.wait(1); + const actualNewAdmin = await vaultProxyInstance.owner(); + console.log("The new admin is ", actualNewAdmin); + } else { + console.log("current admin is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.CHANGE_VAULT_PROXY_V2_ADMIN.NAME}: `, error); + } + }); + +const EIP173_ABI = [ + { + inputs: [ + { internalType: "address", name: "implementationAddress", type: "address" }, + { internalType: "address", name: "ownerAddress", type: "address" }, + { internalType: "bytes", name: "data", type: "bytes" }, + ], + stateMutability: "payable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + 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: "owner", + 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: "newOwner", type: "address" }], + name: "transferOwnership", + 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" }, +]; diff --git a/tasks/actions/set-pending-governance.ts b/tasks/actions/set-pending-governance.ts new file mode 100644 index 000000000..c3aeed9f6 --- /dev/null +++ b/tasks/actions/set-pending-governance.ts @@ -0,0 +1,40 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { RegistryProxy } from "../../typechain"; + +task(TASKS.ACTION_TASKS.SET_PENDING_GOVERNANCE.NAME, TASKS.ACTION_TASKS.SET_PENDING_GOVERNANCE.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newPendingGovernance", "address of the new operator", "", types.string) + .setAction(async ({ registry, newPendingGovernance }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newPendingGovernance)) { + throw new Error("new pending governance address is invalid"); + } + + try { + const registryProxyInstance = ( + await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY_PROXY, registry) + ); + const currentPendingGovernance = await registryProxyInstance.pendingGovernance(); + console.log("current pending governance ", currentPendingGovernance); + if (getAddress(newPendingGovernance) != getAddress(currentPendingGovernance)) { + const currentPendingGovernanceSigner = await hre.ethers.getSigner(currentPendingGovernance); + const tx = await registryProxyInstance + .connect(currentPendingGovernanceSigner) + .setPendingGovernance(newPendingGovernance); + await tx.wait(1); + const actualNewPendingGovernance = await registryProxyInstance.pendingGovernance(); + console.log("The new pending governance is ", actualNewPendingGovernance); + } else { + console.log("current new pending governance is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.SET_PENDING_GOVERNANCE.NAME}: `, error); + } + }); diff --git a/tasks/actions/transfer-finance-operator.ts b/tasks/actions/transfer-finance-operator.ts new file mode 100644 index 000000000..bb8958294 --- /dev/null +++ b/tasks/actions/transfer-finance-operator.ts @@ -0,0 +1,37 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { Registry } from "../../typechain"; + +task(TASKS.ACTION_TASKS.TRANSFER_FINANCE_OPERATOR.NAME, TASKS.ACTION_TASKS.TRANSFER_FINANCE_OPERATOR.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newFinanceOperator", "address of the new finance operator", "", types.string) + .setAction(async ({ registry, newFinanceOperator }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newFinanceOperator)) { + throw new Error("new finance operator address is invalid"); + } + + try { + const registryInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registry); + const currentFinanceOperator = await registryInstance.getFinanceOperator(); + console.log("current finance operator ", currentFinanceOperator); + if (getAddress(newFinanceOperator) != getAddress(currentFinanceOperator)) { + const governance = await registryInstance.governance(); + const governanceSigner = await hre.ethers.getSigner(governance); + const tx = await registryInstance.connect(governanceSigner).setFinanceOperator(newFinanceOperator); + await tx.wait(1); + const actualNewFinanceOperator = await registryInstance.getFinanceOperator(); + console.log("The new finance operator is ", actualNewFinanceOperator); + } else { + console.log("current finance operator is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.TRANSFER_FINANCE_OPERATOR.NAME}: `, error); + } + }); diff --git a/tasks/actions/transfer-operation-ownership.ts b/tasks/actions/transfer-operation-ownership.ts new file mode 100644 index 000000000..6fe5cabde --- /dev/null +++ b/tasks/actions/transfer-operation-ownership.ts @@ -0,0 +1,36 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; + +task(TASKS.ACTION_TASKS.TRANSFER_OPERATION_OWNERSHIP.NAME, TASKS.ACTION_TASKS.TRANSFER_OPERATION_OWNERSHIP.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newOperator", "address of the new operator", "", types.string) + .setAction(async ({ registry, newOperator }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newOperator)) { + throw new Error("new operator address is invalid"); + } + + await hre.run(TASKS.ACTION_TASKS.TRANSFER_OPERATOR.NAME, { + registry: registry, + newOperator: newOperator, + }); + + await hre.run(TASKS.ACTION_TASKS.TRANSFER_FINANCE_OPERATOR.NAME, { + registry: registry, + newFinanceOperator: newOperator, + }); + + await hre.run(TASKS.ACTION_TASKS.TRANSFER_RISK_OPERATOR.NAME, { + registry: registry, + newRiskOperator: newOperator, + }); + + await hre.run(TASKS.ACTION_TASKS.TRANSFER_STRATEGY_OPERATOR.NAME, { + registry: registry, + newStrategyOperator: newOperator, + }); + }); diff --git a/tasks/actions/transfer-operator.ts b/tasks/actions/transfer-operator.ts new file mode 100644 index 000000000..5bac680ce --- /dev/null +++ b/tasks/actions/transfer-operator.ts @@ -0,0 +1,37 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { Registry } from "../../typechain"; + +task(TASKS.ACTION_TASKS.TRANSFER_OPERATOR.NAME, TASKS.ACTION_TASKS.TRANSFER_OPERATOR.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newOperator", "address of the new operator", "", types.string) + .setAction(async ({ registry, newOperator }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newOperator)) { + throw new Error("new operator address is invalid"); + } + + try { + const registryInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registry); + const currentOperator = await registryInstance.getOperator(); + console.log("current operator ", currentOperator); + if (getAddress(newOperator) != getAddress(currentOperator)) { + const governance = await registryInstance.governance(); + const governanceSigner = await hre.ethers.getSigner(governance); + const tx = await registryInstance.connect(governanceSigner).setOperator(newOperator); + await tx.wait(1); + const actualNewOperator = await registryInstance.getOperator(); + console.log("The new operator is ", actualNewOperator); + } else { + console.log("current operator is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.TRANSFER_OPERATOR.NAME}: `, error); + } + }); diff --git a/tasks/actions/transfer-risk-operator.ts b/tasks/actions/transfer-risk-operator.ts new file mode 100644 index 000000000..53efd3cc6 --- /dev/null +++ b/tasks/actions/transfer-risk-operator.ts @@ -0,0 +1,37 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { Registry } from "../../typechain"; + +task(TASKS.ACTION_TASKS.TRANSFER_RISK_OPERATOR.NAME, TASKS.ACTION_TASKS.TRANSFER_RISK_OPERATOR.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newRiskOperator", "address of the new risk operator", "", types.string) + .setAction(async ({ registry, newRiskOperator }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newRiskOperator)) { + throw new Error("new risk operator address is invalid"); + } + + try { + const registryInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registry); + const currentRiskOperator = await registryInstance.getRiskOperator(); + console.log("current risk operator ", currentRiskOperator); + if (getAddress(newRiskOperator) != getAddress(currentRiskOperator)) { + const governance = await registryInstance.governance(); + const governanceSigner = await hre.ethers.getSigner(governance); + const tx = await registryInstance.connect(governanceSigner).setRiskOperator(newRiskOperator); + await tx.wait(1); + const actualNewRiskOperator = await registryInstance.getRiskOperator(); + console.log("The new risk operator is ", actualNewRiskOperator); + } else { + console.log("current risk operator is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.TRANSFER_RISK_OPERATOR.NAME}: `, error); + } + }); diff --git a/tasks/actions/transfer-strategy-operator.ts b/tasks/actions/transfer-strategy-operator.ts new file mode 100644 index 000000000..3f5dd90fd --- /dev/null +++ b/tasks/actions/transfer-strategy-operator.ts @@ -0,0 +1,37 @@ +import { task, types } from "hardhat/config"; +import { isAddress } from "../../helpers/helpers"; +import TASKS from "../task-names"; +import { getAddress } from "ethers/lib/utils"; +import { ESSENTIAL_CONTRACTS } from "../../helpers/constants/essential-contracts-name"; +import { Registry } from "../../typechain"; + +task(TASKS.ACTION_TASKS.TRANSFER_STRATEGY_OPERATOR.NAME, TASKS.ACTION_TASKS.TRANSFER_STRATEGY_OPERATOR.DESCRIPTION) + .addParam("registry", "the address of registry", "", types.string) + .addParam("newStrategyOperator", "address of the new strategy operator", "", types.string) + .setAction(async ({ registry, newStrategyOperator }, hre) => { + if (!isAddress(registry)) { + throw new Error("registry address is invalid"); + } + + if (!isAddress(newStrategyOperator)) { + throw new Error("new strategy operator address is invalid"); + } + + try { + const registryInstance = await hre.ethers.getContractAt(ESSENTIAL_CONTRACTS.REGISTRY, registry); + const currentStrategyOperator = await registryInstance.getStrategyOperator(); + console.log("current strategy operator ", currentStrategyOperator); + if (getAddress(newStrategyOperator) != getAddress(currentStrategyOperator)) { + const governance = await registryInstance.governance(); + const governanceSigner = await hre.ethers.getSigner(governance); + const tx = await registryInstance.connect(governanceSigner).setStrategyOperator(newStrategyOperator); + await tx.wait(1); + const actualNewStrategyOperator = await registryInstance.getStrategyOperator(); + console.log("The new strategy operator is ", actualNewStrategyOperator); + } else { + console.log("current strategy operator is upto date"); + } + } catch (error: any) { + console.error(`${TASKS.ACTION_TASKS.TRANSFER_STRATEGY_OPERATOR.NAME}: `, error); + } + }); diff --git a/tasks/task-names.ts b/tasks/task-names.ts index f35dfee5d..109cfb0d9 100644 --- a/tasks/task-names.ts +++ b/tasks/task-names.ts @@ -47,5 +47,16 @@ export default { DESCRIPTION: "Get price per full share of the vault", }, GET_TOTAL_SUPPLY: { NAME: "get-total-supply", DESCRIPTION: "Get total supply of the vault" }, + TRANSFER_OPERATOR: { NAME: "transfer-operator", DESCRIPTION: "Transfer operator" }, + TRANSFER_FINANCE_OPERATOR: { NAME: "transfer-finance-operator", DESCRIPTION: "Transfer finance operator" }, + TRANSFER_RISK_OPERATOR: { NAME: "transfer-risk-operator", DESCRIPTION: "Transfer risk operator" }, + TRANSFER_STRATEGY_OPERATOR: { NAME: "transfer-strategy-operator", DESCRIPTION: "Transfer strategy operator" }, + TRANSFER_OPERATION_OWNERSHIP: { + NAME: "transfer-operation-ownership", + DESCRIPTION: "Transfer financeOperator, riskOperator, strategyOperator anf operator one by one", + }, + SET_PENDING_GOVERNANCE: { NAME: "set-pending-governance", DESCRIPTION: "set pending governance" }, + ACCEPT_GOVERNANCE: { NAME: "accept-governance", DESCRIPTION: "accept governance" }, + CHANGE_VAULT_PROXY_V2_ADMIN: { NAME: "change-vault-proxy-v2-admin", DESCRIPTION: "change vault proxy v2 admin" }, }, }; From ffe2095171fd2714dcb7df348e969bf3873c8c65 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 7 Apr 2022 20:22:15 -0400 Subject: [PATCH 49/52] docs(cli): formatting --- cli.md | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/cli.md b/cli.md index a83db1dc7..176daa793 100644 --- a/cli.md +++ b/cli.md @@ -532,8 +532,8 @@ Usage: execute a get action in smart contract Options: --name required
the name of contract --address required
the address of smart contract ---functionabi required a get function abi ---params optional the required params of the function (default: "") +--functionabi required a get function abi +--params optional the required params of the function (default: "") --network optional name of the network provider (default: hardhat) ``` @@ -559,7 +559,7 @@ Usage: get price per full share of the vault Options: --vault required
the address of vault ---block-number block number +--block-number optional block number (default: current block number) --network optional name of the network provider (default: hardhat) ``` @@ -579,7 +579,7 @@ Usage: get total supply of the vault Options: --vault required
the address of vault ---block-number block number +--block-number optional block number (default: current block number) --network optional name of the network provider (default: hardhat) ``` @@ -598,9 +598,9 @@ Options: Usage: change vault proxy admin Options: ---vault required
the address of vault ---new-admin required the address of new admin ---network optional name of the network provider (default: hardhat) +--vault required
the address of vault +--new-admin required the address of new admin +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -618,9 +618,9 @@ Options: Usage: set pending governance Options: ---registry required
the address of registry ---new-pending-governance required the address of pending governance ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-pending-governance required the address of pending governance +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -638,8 +638,8 @@ Options: Usage: accept pending governance Options: ---registry required
the address of registry ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -656,9 +656,9 @@ Options: Usage: transfer all operator roles to same address Options: ---registry required
the address of registry ---new-operator required
the address of new operator ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-operator required
the address of new operator +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -676,9 +676,9 @@ yarn hardhat transfer-operation-ownership \ Usage: transfer operator Options: ---registry required
the address of registry ---new-operator required
the address of new finance operator ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-operator required
the address of new finance operator +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -696,9 +696,9 @@ yarn hardhat transfer-operator \ Usage: transfer finance operator Options: ---registry required
the address of registry ---new-finance-operator required
the address of new finance operator ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-finance-operator required
the address of new finance operator +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -716,9 +716,9 @@ yarn hardhat transfer-finance-operator \ Usage: transfer risk operator Options: ---registry required
the address of registry ---new-risk-operator required
the address of new risk operator ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-risk-operator required
the address of new risk operator +--network optional name of the network provider (default: hardhat) ``` - Example: @@ -736,9 +736,9 @@ yarn hardhat transfer-risk-operator \ Usage: transfer strategy operator Options: ---registry required
the address of registry ---new-strategy-operator required
the address of new strategy operator ---network optional name of the network provider (default: hardhat) +--registry required
the address of registry +--new-strategy-operator required
the address of new strategy operator +--network optional name of the network provider (default: hardhat) ``` - Example: From 6cfa27bde41ad0622951a0ff4859b5662a7876a6 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Thu, 7 Apr 2022 23:28:10 -0400 Subject: [PATCH 50/52] ci(tasks): deplopy to tenderly and config opUSDCgrow vault --- deploy_polygon/011_config_opUSDCgrow.ts | 2 +- .../tenderly-polygon@26874895/.chainId | 1 + .../AaveAdapter.json | 901 +++++++ .../ApeSwapPoolAdapter.json | 748 ++++++ .../BeefyFinanceAdapter.json | 1315 ++++++++++ .../CurveGaugeAdapter.json | 925 +++++++ .../CurveStableSwapAdapter.json | 983 ++++++++ .../QuickSwapPoolAdapter.json | 748 ++++++ .../tenderly-polygon@26874895/Registry.json | 2142 +++++++++++++++++ .../RegistryProxy.json | 1338 ++++++++++ .../RiskManager.json | 188 ++ .../RiskManagerProxy.json | 175 ++ .../StrategyProvider.json | 420 ++++ .../SushiswapPoolAdapter.json | 748 ++++++ .../tenderly-polygon@26874895/opUSDCgrow.json | 1492 ++++++++++++ .../opUSDCgrow_Implementation.json | 1320 ++++++++++ .../opUSDCgrow_Proxy.json | 232 ++ .../2db89642daf7ebd20cbbef9f4540b20d.json | 39 + tasks/actions/set-pending-governance.ts | 6 +- 19 files changed, 13718 insertions(+), 5 deletions(-) create mode 100644 deployments/tenderly-polygon@26874895/.chainId create mode 100644 deployments/tenderly-polygon@26874895/AaveAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/ApeSwapPoolAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/BeefyFinanceAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/CurveGaugeAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/CurveStableSwapAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/QuickSwapPoolAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/Registry.json create mode 100644 deployments/tenderly-polygon@26874895/RegistryProxy.json create mode 100644 deployments/tenderly-polygon@26874895/RiskManager.json create mode 100644 deployments/tenderly-polygon@26874895/RiskManagerProxy.json create mode 100644 deployments/tenderly-polygon@26874895/StrategyProvider.json create mode 100644 deployments/tenderly-polygon@26874895/SushiswapPoolAdapter.json create mode 100644 deployments/tenderly-polygon@26874895/opUSDCgrow.json create mode 100644 deployments/tenderly-polygon@26874895/opUSDCgrow_Implementation.json create mode 100644 deployments/tenderly-polygon@26874895/opUSDCgrow_Proxy.json create mode 100644 deployments/tenderly-polygon@26874895/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json diff --git a/deploy_polygon/011_config_opUSDCgrow.ts b/deploy_polygon/011_config_opUSDCgrow.ts index 6ca00b6fc..83d953a62 100644 --- a/deploy_polygon/011_config_opUSDCgrow.ts +++ b/deploy_polygon/011_config_opUSDCgrow.ts @@ -28,7 +28,7 @@ const func: DeployFunction = async ({ ethers, deployments }: HardhatRuntimeEnvir // 0x0201000000000000000000000000000000000000000000640000000000000000 // const expectedConfig = BigNumber.from("906392544231311161076231617881117198619499239097192527361058388634069106688"); const expectedUserDepositCapUT = BigNumber.from("100000000000"); // 100,000 USDC - const expectedMinimumDepositValueUT = BigNumber.from("1000000000"); // 1000 USDC + const expectedMinimumDepositValueUT = BigNumber.from("0"); // 0 USDC const expectedTotalValueLockedLimitUT = BigNumber.from("10000000000000"); // 10,000,000 const expectedAccountsRoot = "0x62689e8751ba85bee0855c30d61d17345faa5b23e82626a83f8d63db50d67694"; const expectedRiskProfileCode = BigNumber.from("1"); diff --git a/deployments/tenderly-polygon@26874895/.chainId b/deployments/tenderly-polygon@26874895/.chainId new file mode 100644 index 000000000..0973804c4 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/.chainId @@ -0,0 +1 @@ +137 \ No newline at end of file diff --git a/deployments/tenderly-polygon@26874895/AaveAdapter.json b/deployments/tenderly-polygon@26874895/AaveAdapter.json new file mode 100644 index 000000000..aca508aed --- /dev/null +++ b/deployments/tenderly-polygon@26874895/AaveAdapter.json @@ -0,0 +1,901 @@ +{ + "address": "0x3a60CaD68b2d469B63060a5904A5F74c8aD46d98", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "PROTOCOL_DATA_PROVIDER_ID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WMATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_codes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolToken", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "incentivesController", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapV2Router02", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x946f4b07c1ee1e94553d4b5715789902cc4c32c51c8e762b2a0c2b6926cfd9a2", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3a60CaD68b2d469B63060a5904A5F74c8aD46d98", + "transactionIndex": 0, + "gasUsed": "2021538", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x106cc1c2f131645b504c3852cf5ea7be43425b79de137872ef50555404ae4ec4", + "transactionHash": "0x946f4b07c1ee1e94553d4b5715789902cc4c32c51c8e762b2a0c2b6926cfd9a2", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874912, + "transactionHash": "0x946f4b07c1ee1e94553d4b5715789902cc4c32c51c8e762b2a0c2b6926cfd9a2", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000001d2d3939739fb5e000000000000000000000000000000000000000000000000283d6281dd5362000000000000000000000000000000000000000000000009c14e181465c5219cda000000000000000000000000000000000000000000000000283d6281dd5362000000000000000000000000000000000000000000000009c14e181465c5219cda", + "logIndex": 0, + "blockHash": "0x106cc1c2f131645b504c3852cf5ea7be43425b79de137872ef50555404ae4ec4" + } + ], + "blockNumber": 26874912, + "cumulativeGasUsed": "2021538", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b50604051620023663803806200236683398101604081905261003191610064565b600080546127106001556001600160a01b03929092166001600160a81b031990921691909117600160a01b179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b6122c280620000a46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/ApeSwapPoolAdapter.json b/deployments/tenderly-polygon@26874895/ApeSwapPoolAdapter.json new file mode 100644 index 000000000..edf8a58ef --- /dev/null +++ b/deployments/tenderly-polygon@26874895/ApeSwapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x427A8ec94ce6b0fD6Ac52DCB140d55A046D87ACE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "apeswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factoryRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf7dab8cf5e8bf0b704899f85925d2eff37cb74d6c3de2ac289c662968214e60b", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x427A8ec94ce6b0fD6Ac52DCB140d55A046D87ACE", + "transactionIndex": 0, + "gasUsed": "2262287", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x7563f324b716146e03ecec6d29036582f721a6effb55607233b349b87284433f", + "transactionHash": "0xf7dab8cf5e8bf0b704899f85925d2eff37cb74d6c3de2ac289c662968214e60b", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874915, + "transactionHash": "0xf7dab8cf5e8bf0b704899f85925d2eff37cb74d6c3de2ac289c662968214e60b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000020a6bf8fdd6d0f1000000000000000000000000000000000000000000000000221e111c569178000000000000000000000000000000000000000000000009c1543765cb4b7bf6c9000000000000000000000000000000000000000000000000221e111c569178000000000000000000000000000000000000000000000009c1543765cb4b7bf6c9", + "logIndex": 0, + "blockHash": "0x7563f324b716146e03ecec6d29036582f721a6effb55607233b349b87284433f" + } + ], + "blockNumber": 26874915, + "cumulativeGasUsed": "2262287", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027663803806200276683398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b580620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80637c47b3f4116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b80637c47b3f41461034857806385541e441461035d57806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c57806367ddfad91461031f578063770788721461033a57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e373cf083be4164828f00cae704ec15a36d71149128481565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e373c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b6101e3610290366004612232565b61035b61035636600461239a565b610bb4565b005b61022b61036b3660046123bb565b610cc4565b61022b61037e36600461224f565b610e93565b61022b61271081565b61035b61039a3660046123fc565b610f01565b61035b6103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b61035b6103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61035b61043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273c0788a3ad43d79aa53b09c2eacc313a787d1d607906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273c0788a3ad43d79aa53b09c2eacc313a787d1d6078885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b031673cf083be4164828f00cae704ec15a36d7114912846001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd6003866124e6565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107cc611e07846107ce6124c7565b611e38611e1786623ce9c46124c7565b611e2486623ce9c06124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e66124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c35760003560e01c80637c47b3f4116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b80637c47b3f41461034857806385541e441461035d57806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c57806367ddfad91461031f578063770788721461033a57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e373cf083be4164828f00cae704ec15a36d71149128481565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e373c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b6101e3610290366004612232565b61035b61035636600461239a565b610bb4565b005b61022b61036b3660046123bb565b610cc4565b61022b61037e36600461224f565b610e93565b61022b61271081565b61035b61039a3660046123fc565b610f01565b61035b6103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b61035b6103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61035b61043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273c0788a3ad43d79aa53b09c2eacc313a787d1d607906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273c0788a3ad43d79aa53b09c2eacc313a787d1d6078885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b031673cf083be4164828f00cae704ec15a36d7114912846001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd6003866124e6565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107cc611e07846107ce6124c7565b611e38611e1786623ce9c46124c7565b611e2486623ce9c06124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e66124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/BeefyFinanceAdapter.json b/deployments/tenderly-polygon@26874895/BeefyFinanceAdapter.json new file mode 100644 index 000000000..6a27315e6 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/BeefyFinanceAdapter.json @@ -0,0 +1,1315 @@ +{ + "address": "0x2600a57481C655dd6264f6a91A550504B800B261", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "BIFI", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BIFI_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BIFI_STAKE_VAULT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DAI_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MOO_POLYGON_BIFI_STAKE_VAULT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WATCH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBTC_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "apeswapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmountStake", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInTokenStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalanceStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getStakeAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getStakeSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getUnstakeAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getUnstakeAndWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "getUnstakeAndWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getUnstakeSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficientStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToStakingVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakingVaultToRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x66d3a668facbdaeffde0d99c5807de1cadeb41089db126f27731e98adda99faf", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x2600a57481C655dd6264f6a91A550504B800B261", + "transactionIndex": 0, + "gasUsed": "2453400", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x332d8c0a55d0cfc3249bbd4f16c2ba2c38bed51fdc9e969f6e69caca70417232", + "transactionHash": "0x66d3a668facbdaeffde0d99c5807de1cadeb41089db126f27731e98adda99faf", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874911, + "transactionHash": "0x66d3a668facbdaeffde0d99c5807de1cadeb41089db126f27731e98adda99faf", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000002368e0792d480680000000000000000000000000000000000000000000000002a10361574ac36000000000000000000000000000000000000000000000009c14c4540d22de7a17c0000000000000000000000000000000000000000000000002a10361574ac36000000000000000000000000000000000000000000000009c14c4540d22de7a17c", + "logIndex": 0, + "blockHash": "0x332d8c0a55d0cfc3249bbd4f16c2ba2c38bed51fdc9e969f6e69caca70417232" + } + ], + "blockNumber": 26874911, + "cumulativeGasUsed": "2453400", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002a9738038062002a97833981016040819052620000349162000173565b600080546127106001556001600160a01b03929092166001600160a81b031990921691909117600160a01b1781557f8bddf24ded73b7c9dba4d38c3f1b5be079befb55bf9fa3128f90c4899e7205ce80546001600160a01b031990811673deb0a777ba6f59c78c654b8c92f80238c8002dd2179091557f3c8c345f0018462db38a9c11650917511d105567eaa0e87e44b3875d7647dd18805482167371a4449dd18177a1a19fef671558964f10af4be890811790915560056020527f51ae4f7ea34cb0b6456090b07323f0e62c0b854f43c247a19185cadd41511d2580548316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701790559091527fd0246301541db8978c3f99466b558b96ebb06f5b112a6c440f0ace4b3736b86580549091167309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b2179055620001a5565b6000602082840312156200018657600080fd5b81516001600160a01b03811681146200019e57600080fd5b9392505050565b6128e280620001b56000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c80637df50ed8116101b8578063b3fe7f5a11610104578063ecdd76f3116100a2578063ef856be91161007c578063ef856be9146107c9578063f1aacbb7146107e9578063f49307ca146107fc578063fd1365ea1461080f57600080fd5b8063ecdd76f314610780578063ecebc29c1461079b578063ee665bed146107b657600080fd5b8063da699f96116100de578063da699f961461072c578063df9357221461073f578063e085edc514610752578063e49d5ecc1461076d57600080fd5b8063b3fe7f5a146106f3578063d463fcf614610706578063d74baaf81461071957600080fd5b80639c115fd111610171578063a68da4aa1161014b578063a68da4aa14610697578063a91ee0dc146106b2578063a9842ff4146106c5578063afd908d9146106e057600080fd5b80639c115fd11461064e578063a2e7f8c414610661578063a61d81081461067c57600080fd5b80637df50ed8146105d15780638476fdec146105e757806385541e44146105fa57806390e06fc21461060d57806390e6160514610628578063919b69d71461063b57600080fd5b80634ad36e021161027757806364dd5f80116102305780637213c07c1161020a5780637213c07c1461056d57806374df3b2f1461059657806377078872146105a95780637c47b3f4146105bc57600080fd5b806364dd5f801461052c57806367ddfad91461053f5780636d267d7c1461055a57600080fd5b80634ad36e02146104a55780634d9e541a146104b85780634f83b52d146104d35780635adca02e146104f35780635e6502e014610506578063609257791461051957600080fd5b80632627a099116102e45780632af06b96116102be5780632af06b961461043b5780632de778381461045c57806336d8bf931461046f578063489b52951461049257600080fd5b80632627a0991461040257806328c1f99b14610415578063292ccf021461042857600080fd5b8063027a304d1461032c5780630c9d8d5c1461036a57806315b550d61461038a578063179af4e5146103bd578063191c194b146103d057806325e45978146103d9575b600080fd5b61035761033a3660046122b7565b600360209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61037d6103783660046122f0565b610822565b6040516103619190612388565b6103a5730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6040516001600160a01b039091168152602001610361565b61037d6103cb3660046122f0565b6108b2565b61035760015481565b6103a56103e73660046123ea565b6004602052600090815260409020546001600160a01b031681565b6103576104103660046122f0565b6108ce565b6000546103a5906001600160a01b031681565b61037d61043636600461240e565b610a56565b60005461044f90600160a01b900460ff1681565b6040516103619190612475565b61035761046a3660046122b7565b610b1a565b61048261047d3660046123ea565b610b87565b6040519015158152602001610361565b61037d6104a03660046122f0565b610bbe565b6103576104b336600461240e565b610c3c565b6103a57309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b281565b6103576104e13660046123ea565b60026020526000908152604090205481565b61035761050136600461240e565b610c86565b61037d6105143660046122b7565b610d56565b61037d61052736600461240e565b610d70565b61035761053a3660046122f0565b610e0d565b6103a573c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b61037d6105683660046122b7565b610e1f565b6103a561057b3660046123ea565b6005602052600090815260409020546001600160a01b031681565b61037d6105a43660046122f0565b610ed8565b6103a56105b73660046123ea565b610ef3565b6105cf6105ca36600461249d565b610f20565b005b61037d6105df3660046122b7565b606092915050565b6104826105f536600461240e565b611044565b6103576106083660046124be565b61105f565b6103a573d3395577febc6adab25490a69955ebc47040766c81565b6103576106363660046122f0565b611144565b6105cf6106493660046124ff565b6111b3565b61037d61065c3660046124ff565b6112a1565b6103a57377276a7c9ff3a6cbd334524d6f1f6219d039ac0e81565b6103a5739b36eceac46b70acfb7c2d6f3fd51aea87c3101881565b6103a573deb0a777ba6f59c78c654b8c92f80238c8002dd281565b6105cf6106c03660046123ea565b611482565b6103a573e71f3c11d4535a7f8c5fb03fda57899b2c9c721f81565b6103576106ee3660046122b7565b611579565b6103576107013660046122f0565b6115c9565b61037d61071436600461240e565b611615565b6103a56107273660046122b7565b919050565b6105cf61073a36600461252b565b61162b565b61037d61074d36600461240e565b611705565b6103a57371a4449dd18177a1a19fef671558964f10af4be881565b61048261077b36600461240e565b611970565b6103a573fecf784f48125ccb7d8855cdda7c5ed6b5024cb381565b6103a573fbdd194376de19a88118e84e279b977f165d01b881565b6103576107c43660046124be565b61197e565b6107dc6107d73660046122b7565b611a73565b6040516103619190612588565b6105cf6107f73660046124be565b611b30565b61037d61080a3660046122f0565b611c2e565b61037d61081d3660046124ff565b611c4b565b6060600061082f83610ef3565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061259b565b90506108a985858584611615565b95945050505050565b606060006108c08584611579565b90506108a985858584610a56565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610920918a91016001600160a01b0391909116815260200190565b602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610961919061259b565b905080156108a957836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb919061259b565b6109d690600a6126ae565b846001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061259b565b610a4290836126ba565b610a4c91906126d9565b9695505050505050565b60608115610b12576040805160028082526060820190925290816020015b6060815260200190600190039081610a74579050509050610a958383611c4b565b600081518110610aa757610aa7612711565b602002602001015181600081518110610ac257610ac2612711565b6020026020010181905250610ad985858585610d70565b600081518110610aeb57610aeb612711565b602002602001015181600181518110610b0657610b06612711565b60200260200101819052505b949350505050565b6000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e919061259b565b90505b92915050565b60006001600160a01b03821673fbdd194376de19a88118e84e279b977f165d01b81415610bb657506001919050565b506000919050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e919061259b565b90506108a985858584611705565b600080610c4a868686611144565b90506000610c59878787610e0d565b905080610c6685846126ba565b610c7091906126d9565b610c7b906001612727565b979650505050505050565b6001600160a01b0380831660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610cd8918b91016001600160a01b0391909116815260200190565b602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d19919061259b565b90506000610d288888886108ce565b905080610d3586846126ba565b610d3f91906126d9565b610d4a906001612727565b98975050505050505050565b60606000610d648484611579565b9050610b128382611c4b565b60608115610b125760408051600180825281830190925290816020015b6060815260200190600190039081610d8d579050509050826040516024810184905260440160408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610deb9392910161273f565b60405160208183030381529060405281600081518110610b0657610b06612711565b6000610b1283836107c4878787611144565b6001600160a01b038181166000908152600460205260409081902054815160018082528184019093526060939190911691816020015b6060815260200190600190039081610e55579050506040805160048152602481018252602080820180516001600160e01b0316631e8c5c8960e11b1790529151929450610ea49284920161273f565b60405160208183030381529060405282600081518110610ec657610ec6612711565b60200260200101819052505092915050565b60606000610ee7858585611144565b90506108a983826112a1565b6001600160a01b039081166000908152600460209081526040808320548416835260059091529020541690565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612763565b6001600160a01b0316336001600160a01b031614610fce5760405162461bcd60e51b8152600401610fc590612780565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610ff357610ff361245f565b02179055506000543390600160a01b900460ff1660018111156110185761101861245f565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806110528686866108ce565b9092111595945050505050565b6000826001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c3919061259b565b836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611101573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611125919061259b565b61113090600a6126ae565b61113a90846126ba565b610b1291906126d9565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a08231906024015b602060405180830381865afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061259b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190612763565b6001600160a01b0316336001600160a01b0316146112585760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60608115610b81576001600160a01b03838116600090815260046020526040812054909116908460408051600380825260808201909252919250816020015b60608152602001906001900390816112e0579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161134f9392910161273f565b6040516020818303038152906040528360008151811061137157611371612711565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516113d39392910161273f565b604051602081830303815290604052836001815181106113f5576113f5612711565b6020026020010181905250818460405160240161141491815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663534a7e1d60e11b179052905161144d9392910161273f565b6040516020818303038152906040528360028151811061146f5761146f612711565b6020026020010181905250505092915050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f79190612763565b6001600160a01b0316336001600160a01b0316146115575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610fc5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b81529293169182916370a0823191611172918891016001600160a01b0391909116815260200190565b6001600160a01b0380831660009081526004602081905260408083205490516246613160e11b815292931691628cc26291611172918891016001600160a01b0391909116815260200190565b60606108a98561162485610ef3565b8685611ce9565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190612763565b6001600160a01b0316336001600160a01b0316146116d05760405162461bcd60e51b8152600401610fc590612780565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000821161174d5760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b6044820152606401610fc5565b6000611765848685611760886000610b1a565b611f73565b9050600081116117b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e74206465706f73697420616d6f756e7400000000006044820152606401610fc5565b6040805160038082526080820190925290816020015b60608152602001906001900390816117cd579050506040516001600160a01b038616602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161183c9392910161273f565b6040516020818303038152906040528260008151811061185e5761185e612711565b60209081029190910101526040516001600160a01b038516602482015260448101829052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516118c09392910161273f565b604051602081830303815290604052826001815181106118e2576118e2612711565b6020026020010181905250838160405160240161190191815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663b6b55f2560e01b179052905161193a9392910161273f565b6040516020818303038152906040528260028151811061195c5761195c612711565b602002602001018190525050949350505050565b600080611052868686610e0d565b60008115611a6c57826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e8919061259b565b6119f390600a6126ae565b836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a55919061259b565b611a5f90846126ba565b611a6991906126d9565b91505b5092915050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190612763565b81600081518110611b0a57611b0a612711565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190612763565b6001600160a01b0316336001600160a01b031614611bd55760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03838116600090815260036020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611c3d858585611144565b90506108a985858584610d70565b60608115610b81576001600160a01b0383811660009081526004602052604090819020548151600180825281840190935292169190816020015b6060815260200190600190039081611c855790505091508083604051602401611cb091815260200190565b60408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610ea49392910161273f565b60608115610b1257600073c0788a3ad43d79aa53b09c2eacc313a787d1d60763d06ca61f84611d188888611fdf565b6040518363ffffffff1660e01b8152600401611d359291906127b7565b600060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d7a91908101906127d0565b905060008160018351611d8d9190612882565b81518110611d9d57611d9d612711565b60200260200101511115611f6a576040805160038082526080820190925290816020015b6060815260200190600190039081611dc15790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611e3b9392910161273f565b60405160208183030381529060405282600081518110611e5d57611e5d612711565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101849052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611eca9392910161273f565b60405160208183030381529060405282600181518110611eec57611eec612711565b602002602001018190525073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000611f198888611fdf565b89600019604051602401611f31959493929190612899565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b179052905161193a9392910161273f565b50949350505050565b6000806001600054600160a01b900460ff166001811115611f9657611f9661245f565b14611fc6576001600160a01b03808716600090815260036020908152604080832093891683529290522054611fd0565b611fd08684612248565b90508084116108a95783610a4c565b6060600073c0788a3ad43d79aa53b09c2eacc313a787d1d6076001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612035573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120599190612763565b9050806001600160a01b0316836001600160a01b0316141561210257604080516002808252606082018352909160208301908036833701905050915083826000815181106120a9576120a9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106120dd576120dd612711565b60200260200101906001600160a01b031690816001600160a01b031681525050611a6c565b806001600160a01b0316846001600160a01b03161415612184576040805160028082526060820183529091602083019080368337019050509150808260008151811061215057612150612711565b60200260200101906001600160a01b031690816001600160a01b03168152505082826001815181106120dd576120dd612711565b60408051600380825260808201909252906020820160608036833701905050915083826000815181106121b9576121b9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106121ed576121ed612711565b60200260200101906001600160a01b031690816001600160a01b031681525050828260028151811061222157612221612711565b60200260200101906001600160a01b031690816001600160a01b0316815250505092915050565b6001600160a01b0382166000908152600260205260408120548181156122845761271061227583866126ba565b61227f91906126d9565b6108a9565b6127106001548561229591906126ba565b6108a991906126d9565b6001600160a01b03811681146122b457600080fd5b50565b600080604083850312156122ca57600080fd5b82356122d58161229f565b915060208301356122e58161229f565b809150509250929050565b60008060006060848603121561230557600080fd5b83356123108161229f565b925060208401356123208161229f565b915060408401356123308161229f565b809150509250925092565b6000815180845260005b8181101561236157602081850181015186830182015201612345565b81811115612373576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123dd57603f198886030184526123cb85835161233b565b945092850192908501906001016123af565b5092979650505050505050565b6000602082840312156123fc57600080fd5b81356124078161229f565b9392505050565b6000806000806080858703121561242457600080fd5b843561242f8161229f565b9350602085013561243f8161229f565b9250604085013561244f8161229f565b9396929550929360600135925050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061249757634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156124af57600080fd5b81356002811061240757600080fd5b6000806000606084860312156124d357600080fd5b83356124de8161229f565b925060208401356124ee8161229f565b929592945050506040919091013590565b6000806040838503121561251257600080fd5b823561251d8161229f565b946020939093013593505050565b60006020828403121561253d57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561257d5781516001600160a01b031687529582019590820190600101612558565b509495945050505050565b602081526000610b7e6020830184612544565b6000602082840312156125ad57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156126055781600019048211156125eb576125eb6125b4565b808516156125f857918102915b93841c93908002906125cf565b509250929050565b60008261261c57506001610b81565b8161262957506000610b81565b816001811461263f576002811461264957612665565b6001915050610b81565b60ff84111561265a5761265a6125b4565b50506001821b610b81565b5060208310610133831016604e8410600b8410161715612688575081810a610b81565b61269283836125ca565b80600019048211156126a6576126a66125b4565b029392505050565b6000610b7e838361260d565b60008160001904831182151516156126d4576126d46125b4565b500290565b6000826126f657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000821982111561273a5761273a6125b4565b500190565b6001600160a01b0383168152604060208201819052600090610b129083018461233b565b60006020828403121561277557600080fd5b81516124078161229f565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b828152604060208201526000610b126040830184612544565b600060208083850312156127e357600080fd5b825167ffffffffffffffff808211156127fb57600080fd5b818501915085601f83011261280f57600080fd5b815181811115612821576128216126fb565b8060051b604051601f19603f83011681018181108582111715612846576128466126fb565b60405291825284820192508381018501918883111561286457600080fd5b938501935b82851015610d4a57845184529385019392850192612869565b600082821015612894576128946125b4565b500390565b85815284602082015260a0604082015260006128b860a0830186612544565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103275760003560e01c80637df50ed8116101b8578063b3fe7f5a11610104578063ecdd76f3116100a2578063ef856be91161007c578063ef856be9146107c9578063f1aacbb7146107e9578063f49307ca146107fc578063fd1365ea1461080f57600080fd5b8063ecdd76f314610780578063ecebc29c1461079b578063ee665bed146107b657600080fd5b8063da699f96116100de578063da699f961461072c578063df9357221461073f578063e085edc514610752578063e49d5ecc1461076d57600080fd5b8063b3fe7f5a146106f3578063d463fcf614610706578063d74baaf81461071957600080fd5b80639c115fd111610171578063a68da4aa1161014b578063a68da4aa14610697578063a91ee0dc146106b2578063a9842ff4146106c5578063afd908d9146106e057600080fd5b80639c115fd11461064e578063a2e7f8c414610661578063a61d81081461067c57600080fd5b80637df50ed8146105d15780638476fdec146105e757806385541e44146105fa57806390e06fc21461060d57806390e6160514610628578063919b69d71461063b57600080fd5b80634ad36e021161027757806364dd5f80116102305780637213c07c1161020a5780637213c07c1461056d57806374df3b2f1461059657806377078872146105a95780637c47b3f4146105bc57600080fd5b806364dd5f801461052c57806367ddfad91461053f5780636d267d7c1461055a57600080fd5b80634ad36e02146104a55780634d9e541a146104b85780634f83b52d146104d35780635adca02e146104f35780635e6502e014610506578063609257791461051957600080fd5b80632627a099116102e45780632af06b96116102be5780632af06b961461043b5780632de778381461045c57806336d8bf931461046f578063489b52951461049257600080fd5b80632627a0991461040257806328c1f99b14610415578063292ccf021461042857600080fd5b8063027a304d1461032c5780630c9d8d5c1461036a57806315b550d61461038a578063179af4e5146103bd578063191c194b146103d057806325e45978146103d9575b600080fd5b61035761033a3660046122b7565b600360209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61037d6103783660046122f0565b610822565b6040516103619190612388565b6103a5730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6040516001600160a01b039091168152602001610361565b61037d6103cb3660046122f0565b6108b2565b61035760015481565b6103a56103e73660046123ea565b6004602052600090815260409020546001600160a01b031681565b6103576104103660046122f0565b6108ce565b6000546103a5906001600160a01b031681565b61037d61043636600461240e565b610a56565b60005461044f90600160a01b900460ff1681565b6040516103619190612475565b61035761046a3660046122b7565b610b1a565b61048261047d3660046123ea565b610b87565b6040519015158152602001610361565b61037d6104a03660046122f0565b610bbe565b6103576104b336600461240e565b610c3c565b6103a57309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b281565b6103576104e13660046123ea565b60026020526000908152604090205481565b61035761050136600461240e565b610c86565b61037d6105143660046122b7565b610d56565b61037d61052736600461240e565b610d70565b61035761053a3660046122f0565b610e0d565b6103a573c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b61037d6105683660046122b7565b610e1f565b6103a561057b3660046123ea565b6005602052600090815260409020546001600160a01b031681565b61037d6105a43660046122f0565b610ed8565b6103a56105b73660046123ea565b610ef3565b6105cf6105ca36600461249d565b610f20565b005b61037d6105df3660046122b7565b606092915050565b6104826105f536600461240e565b611044565b6103576106083660046124be565b61105f565b6103a573d3395577febc6adab25490a69955ebc47040766c81565b6103576106363660046122f0565b611144565b6105cf6106493660046124ff565b6111b3565b61037d61065c3660046124ff565b6112a1565b6103a57377276a7c9ff3a6cbd334524d6f1f6219d039ac0e81565b6103a5739b36eceac46b70acfb7c2d6f3fd51aea87c3101881565b6103a573deb0a777ba6f59c78c654b8c92f80238c8002dd281565b6105cf6106c03660046123ea565b611482565b6103a573e71f3c11d4535a7f8c5fb03fda57899b2c9c721f81565b6103576106ee3660046122b7565b611579565b6103576107013660046122f0565b6115c9565b61037d61071436600461240e565b611615565b6103a56107273660046122b7565b919050565b6105cf61073a36600461252b565b61162b565b61037d61074d36600461240e565b611705565b6103a57371a4449dd18177a1a19fef671558964f10af4be881565b61048261077b36600461240e565b611970565b6103a573fecf784f48125ccb7d8855cdda7c5ed6b5024cb381565b6103a573fbdd194376de19a88118e84e279b977f165d01b881565b6103576107c43660046124be565b61197e565b6107dc6107d73660046122b7565b611a73565b6040516103619190612588565b6105cf6107f73660046124be565b611b30565b61037d61080a3660046122f0565b611c2e565b61037d61081d3660046124ff565b611c4b565b6060600061082f83610ef3565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061259b565b90506108a985858584611615565b95945050505050565b606060006108c08584611579565b90506108a985858584610a56565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610920918a91016001600160a01b0391909116815260200190565b602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610961919061259b565b905080156108a957836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb919061259b565b6109d690600a6126ae565b846001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061259b565b610a4290836126ba565b610a4c91906126d9565b9695505050505050565b60608115610b12576040805160028082526060820190925290816020015b6060815260200190600190039081610a74579050509050610a958383611c4b565b600081518110610aa757610aa7612711565b602002602001015181600081518110610ac257610ac2612711565b6020026020010181905250610ad985858585610d70565b600081518110610aeb57610aeb612711565b602002602001015181600181518110610b0657610b06612711565b60200260200101819052505b949350505050565b6000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e919061259b565b90505b92915050565b60006001600160a01b03821673fbdd194376de19a88118e84e279b977f165d01b81415610bb657506001919050565b506000919050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e919061259b565b90506108a985858584611705565b600080610c4a868686611144565b90506000610c59878787610e0d565b905080610c6685846126ba565b610c7091906126d9565b610c7b906001612727565b979650505050505050565b6001600160a01b0380831660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610cd8918b91016001600160a01b0391909116815260200190565b602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d19919061259b565b90506000610d288888886108ce565b905080610d3586846126ba565b610d3f91906126d9565b610d4a906001612727565b98975050505050505050565b60606000610d648484611579565b9050610b128382611c4b565b60608115610b125760408051600180825281830190925290816020015b6060815260200190600190039081610d8d579050509050826040516024810184905260440160408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610deb9392910161273f565b60405160208183030381529060405281600081518110610b0657610b06612711565b6000610b1283836107c4878787611144565b6001600160a01b038181166000908152600460205260409081902054815160018082528184019093526060939190911691816020015b6060815260200190600190039081610e55579050506040805160048152602481018252602080820180516001600160e01b0316631e8c5c8960e11b1790529151929450610ea49284920161273f565b60405160208183030381529060405282600081518110610ec657610ec6612711565b60200260200101819052505092915050565b60606000610ee7858585611144565b90506108a983826112a1565b6001600160a01b039081166000908152600460209081526040808320548416835260059091529020541690565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612763565b6001600160a01b0316336001600160a01b031614610fce5760405162461bcd60e51b8152600401610fc590612780565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610ff357610ff361245f565b02179055506000543390600160a01b900460ff1660018111156110185761101861245f565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806110528686866108ce565b9092111595945050505050565b6000826001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c3919061259b565b836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611101573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611125919061259b565b61113090600a6126ae565b61113a90846126ba565b610b1291906126d9565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a08231906024015b602060405180830381865afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061259b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190612763565b6001600160a01b0316336001600160a01b0316146112585760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60608115610b81576001600160a01b03838116600090815260046020526040812054909116908460408051600380825260808201909252919250816020015b60608152602001906001900390816112e0579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161134f9392910161273f565b6040516020818303038152906040528360008151811061137157611371612711565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516113d39392910161273f565b604051602081830303815290604052836001815181106113f5576113f5612711565b6020026020010181905250818460405160240161141491815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663534a7e1d60e11b179052905161144d9392910161273f565b6040516020818303038152906040528360028151811061146f5761146f612711565b6020026020010181905250505092915050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f79190612763565b6001600160a01b0316336001600160a01b0316146115575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610fc5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b81529293169182916370a0823191611172918891016001600160a01b0391909116815260200190565b6001600160a01b0380831660009081526004602081905260408083205490516246613160e11b815292931691628cc26291611172918891016001600160a01b0391909116815260200190565b60606108a98561162485610ef3565b8685611ce9565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190612763565b6001600160a01b0316336001600160a01b0316146116d05760405162461bcd60e51b8152600401610fc590612780565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000821161174d5760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b6044820152606401610fc5565b6000611765848685611760886000610b1a565b611f73565b9050600081116117b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e74206465706f73697420616d6f756e7400000000006044820152606401610fc5565b6040805160038082526080820190925290816020015b60608152602001906001900390816117cd579050506040516001600160a01b038616602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161183c9392910161273f565b6040516020818303038152906040528260008151811061185e5761185e612711565b60209081029190910101526040516001600160a01b038516602482015260448101829052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516118c09392910161273f565b604051602081830303815290604052826001815181106118e2576118e2612711565b6020026020010181905250838160405160240161190191815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663b6b55f2560e01b179052905161193a9392910161273f565b6040516020818303038152906040528260028151811061195c5761195c612711565b602002602001018190525050949350505050565b600080611052868686610e0d565b60008115611a6c57826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e8919061259b565b6119f390600a6126ae565b836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a55919061259b565b611a5f90846126ba565b611a6991906126d9565b91505b5092915050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190612763565b81600081518110611b0a57611b0a612711565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190612763565b6001600160a01b0316336001600160a01b031614611bd55760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03838116600090815260036020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611c3d858585611144565b90506108a985858584610d70565b60608115610b81576001600160a01b0383811660009081526004602052604090819020548151600180825281840190935292169190816020015b6060815260200190600190039081611c855790505091508083604051602401611cb091815260200190565b60408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610ea49392910161273f565b60608115610b1257600073c0788a3ad43d79aa53b09c2eacc313a787d1d60763d06ca61f84611d188888611fdf565b6040518363ffffffff1660e01b8152600401611d359291906127b7565b600060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d7a91908101906127d0565b905060008160018351611d8d9190612882565b81518110611d9d57611d9d612711565b60200260200101511115611f6a576040805160038082526080820190925290816020015b6060815260200190600190039081611dc15790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611e3b9392910161273f565b60405160208183030381529060405282600081518110611e5d57611e5d612711565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101849052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611eca9392910161273f565b60405160208183030381529060405282600181518110611eec57611eec612711565b602002602001018190525073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000611f198888611fdf565b89600019604051602401611f31959493929190612899565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b179052905161193a9392910161273f565b50949350505050565b6000806001600054600160a01b900460ff166001811115611f9657611f9661245f565b14611fc6576001600160a01b03808716600090815260036020908152604080832093891683529290522054611fd0565b611fd08684612248565b90508084116108a95783610a4c565b6060600073c0788a3ad43d79aa53b09c2eacc313a787d1d6076001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612035573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120599190612763565b9050806001600160a01b0316836001600160a01b0316141561210257604080516002808252606082018352909160208301908036833701905050915083826000815181106120a9576120a9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106120dd576120dd612711565b60200260200101906001600160a01b031690816001600160a01b031681525050611a6c565b806001600160a01b0316846001600160a01b03161415612184576040805160028082526060820183529091602083019080368337019050509150808260008151811061215057612150612711565b60200260200101906001600160a01b031690816001600160a01b03168152505082826001815181106120dd576120dd612711565b60408051600380825260808201909252906020820160608036833701905050915083826000815181106121b9576121b9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106121ed576121ed612711565b60200260200101906001600160a01b031690816001600160a01b031681525050828260028151811061222157612221612711565b60200260200101906001600160a01b031690816001600160a01b0316815250505092915050565b6001600160a01b0382166000908152600260205260408120548181156122845761271061227583866126ba565b61227f91906126d9565b6108a9565b6127106001548561229591906126ba565b6108a991906126d9565b6001600160a01b03811681146122b457600080fd5b50565b600080604083850312156122ca57600080fd5b82356122d58161229f565b915060208301356122e58161229f565b809150509250929050565b60008060006060848603121561230557600080fd5b83356123108161229f565b925060208401356123208161229f565b915060408401356123308161229f565b809150509250925092565b6000815180845260005b8181101561236157602081850181015186830182015201612345565b81811115612373576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123dd57603f198886030184526123cb85835161233b565b945092850192908501906001016123af565b5092979650505050505050565b6000602082840312156123fc57600080fd5b81356124078161229f565b9392505050565b6000806000806080858703121561242457600080fd5b843561242f8161229f565b9350602085013561243f8161229f565b9250604085013561244f8161229f565b9396929550929360600135925050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061249757634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156124af57600080fd5b81356002811061240757600080fd5b6000806000606084860312156124d357600080fd5b83356124de8161229f565b925060208401356124ee8161229f565b929592945050506040919091013590565b6000806040838503121561251257600080fd5b823561251d8161229f565b946020939093013593505050565b60006020828403121561253d57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561257d5781516001600160a01b031687529582019590820190600101612558565b509495945050505050565b602081526000610b7e6020830184612544565b6000602082840312156125ad57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156126055781600019048211156125eb576125eb6125b4565b808516156125f857918102915b93841c93908002906125cf565b509250929050565b60008261261c57506001610b81565b8161262957506000610b81565b816001811461263f576002811461264957612665565b6001915050610b81565b60ff84111561265a5761265a6125b4565b50506001821b610b81565b5060208310610133831016604e8410600b8410161715612688575081810a610b81565b61269283836125ca565b80600019048211156126a6576126a66125b4565b029392505050565b6000610b7e838361260d565b60008160001904831182151516156126d4576126d46125b4565b500290565b6000826126f657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000821982111561273a5761273a6125b4565b500190565b6001600160a01b0383168152604060208201819052600090610b129083018461233b565b60006020828403121561277557600080fd5b81516124078161229f565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b828152604060208201526000610b126040830184612544565b600060208083850312156127e357600080fd5b825167ffffffffffffffff808211156127fb57600080fd5b818501915085601f83011261280f57600080fd5b815181811115612821576128216126fb565b8060051b604051601f19603f83011681018181108582111715612846576128466126fb565b60405291825284820192508381018501918883111561286457600080fd5b938501935b82851015610d4a57845184529385019392850192612869565b600082821015612894576128946125b4565b500390565b85815284602082015260a0604082015260006128b860a0830186612544565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/CurveGaugeAdapter.json b/deployments/tenderly-polygon@26874895/CurveGaugeAdapter.json new file mode 100644 index 000000000..6e1edfdea --- /dev/null +++ b/deployments/tenderly-polygon@26874895/CurveGaugeAdapter.json @@ -0,0 +1,925 @@ +{ + "address": "0xfe28e4C3403dE2a3680d113De1E3CB4Ec716b58e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CRV", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WMATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "am3CrvGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "btcCrvGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "crvUSDBTCETHGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getRewardTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_rewardTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nRewardTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapV2Router02", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rewardTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_gauges", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_nRewardTokens", + "type": "uint256[]" + } + ], + "name": "setNRewardToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_gauges", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_indexes", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "_rewardTokens", + "type": "address[]" + } + ], + "name": "setRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xdffa7bbbcaaaf58ad6c8401c68b9d151be62ff8b6c8aa6ad0ccdd088bbce3f6b", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xfe28e4C3403dE2a3680d113De1E3CB4Ec716b58e", + "transactionIndex": 0, + "gasUsed": "1979676", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x88ef281ea660d27a356b096c06e6481ffc7205c61e0128c0536278183ae6e69f", + "transactionHash": "0xdffa7bbbcaaaf58ad6c8401c68b9d151be62ff8b6c8aa6ad0ccdd088bbce3f6b", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874910, + "transactionHash": "0xdffa7bbbcaaaf58ad6c8401c68b9d151be62ff8b6c8aa6ad0ccdd088bbce3f6b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000001c928d06ca7e2e40000000000000000000000000000000000000000000000002c46c41d07a626000000000000000000000000000000000000000000000009c14a0eb2ca9b1321140000000000000000000000000000000000000000000000002c46c41d07a626000000000000000000000000000000000000000000000009c14a0eb2ca9b132114", + "logIndex": 0, + "blockHash": "0x88ef281ea660d27a356b096c06e6481ffc7205c61e0128c0536278183ae6e69f" + } + ], + "blockNumber": 26874910, + "cumulativeGasUsed": "1979676", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b506040516120ee3803806120ee83398101604081905261002f91610203565b600080546001600160a01b03929092166001600160a01b03199283161781557f1a669c69d67b5f1480a749aa7d3d614b1e2cb51c7e789315c07a86c9dc56090c8054831673172370d5cd63279efa6d502dab29171933a610af9081179091557f1a669c69d67b5f1480a749aa7d3d614b1e2cb51c7e789315c07a86c9dc56090d80548416730d500b1d8e8ef31e21c99d1db9a6444d3adf127090811790915560027ffe2e9de55ee06647d2ba41a46297ce06920b2b593af05c3c2c817021e18fa6d28190557f7caf5542ca88e99b11ee72a7506603147f8871053f85e6eb7626adcfa081534080548616841790557f7caf5542ca88e99b11ee72a7506603147f8871053f85e6eb7626adcfa081534180548616831790557f1852561c65e6cee869bc4ced2bfd24646fc1245c6a06df837553fd17b654b9f081905573b0a366b987d77b5ed5803cbd95c80bb6deab48c09093527f9c5480277ad772a7210554d3f1bc85f8cd72c9acc19a90bb599b0b3058c825fb805485169092179091557f9c5480277ad772a7210554d3f1bc85f8cd72c9acc19a90bb599b0b3058c825fc80549093161790915560208190527f3243fcfb47fedb4b06547df4dcbd40df311965cdabc7be2a7a0c459e5b68b82f55610233565b60006020828403121561021557600080fd5b81516001600160a01b038116811461022c57600080fd5b9392505050565b611eac806102426000396000f3fe608060405234801561001057600080fd5b506004361061021b5760003560e01c80637707887211610125578063ab74dee1116100ad578063df9357221161007c578063df93572214610510578063e49d5ecc14610523578063ee665bed14610456578063ef856be914610536578063f49307ca1461054957600080fd5b8063ab74dee1146104c0578063b3fe7f5a146104d3578063d463fcf6146104ea578063d74baaf8146104fd57600080fd5b806385541e44116100f457806385541e441461045657806390e616051461046a578063945c91421461047d5780639712048714610498578063a91ee0dc146104ad57600080fd5b806377078872146103ff5780637df50ed81461040d57806381a4af151461042357806384773f251461043657600080fd5b8063489b5295116101a85780636092577911610177578063609257791461039057806364dd5f80146103a35780636667f1a6146103b65780636d267d7c146103d15780636fac53ee146103e457600080fd5b8063489b5295146103325780634ad36e02146103455780634d41a1e51461035a5780634d95cad91461037557600080fd5b806328c1f99b116101ef57806328c1f99b1461028f578063298916b2146102ba5780632de77838146102e057806332da07e2146102f357806336d8bf931461030e57600080fd5b806201b0b61461022057806304b87c4c146102495780630c9d8d5c1461026957806310f1fbe51461027c575b600080fd5b61023361022e36600461175a565b61055c565b60405161024091906117bb565b60405180910390f35b61025c6102573660046117ce565b610644565b6040516102409190611877565b61025c6102773660046118d9565b6106c7565b61025c61028a366004611924565b610773565b6000546102a2906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6102d26102c83660046117ce565b6000949350505050565b604051908152602001610240565b6102d26102ee366004611988565b61078b565b6102a273ffbacce0cc7c19d46132f1258fc16cf6871d153c81565b61032261031c36600461175a565b50600090565b6040519015158152602001610240565b61025c6103403660046118d9565b6107ef565b6102d26103533660046119c1565b9392505050565b6102a273a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b6102a2730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61025c61039e3660046119c1565b610868565b6102d26103b13660046118d9565b61091b565b6102a27319793b454d3afc7b454f206ffe95ade26ca6912c81565b61025c6103df366004611988565b610928565b6102a273b0a366b987d77b5ed5803cbd95c80bb6deab48c081565b6102a261031c36600461175a565b61025c61041b366004611988565b606092915050565b6102a2610431366004611a12565b6109da565b6102d261044436600461175a565b60026020526000908152604090205481565b6102d2610464366004611a3e565b92915050565b6102d26104783660046118d9565b610a08565b6102a273172370d5cd63279efa6d502dab29171933a610af81565b6104ab6104a6366004611bb9565b610a76565b005b6104ab6104bb36600461175a565b610caa565b6104ab6104ce366004611c41565b610d98565b6102d26104e13660046118d9565b60009392505050565b61025c6104f83660046119c1565b610f2a565b6102a261050b366004611988565b919050565b61025c61051e3660046119c1565b610f5a565b6103226105313660046119c1565b611113565b610233610544366004611988565b61112e565b61025c6105573660046118d9565b6111eb565b6001600160a01b0381166000908152600260205260409020546060908067ffffffffffffffff81111561059157610591611a7f565b6040519080825280602002602001820160405280156105ba578160200160208202803683370190505b50915060005b8181101561063d576001600160a01b038416600090815260016020526040902081600881106105f1576105f1611ca5565b015483516001600160a01b039091169084908390811061061357610613611ca5565b6001600160a01b03909216602092830291909101909101528061063581611cd1565b9150506105c0565b5050919050565b6040516370a0823160e01b81526001600160a01b0380861660048301526060916106bc91879187918791908716906370a0823190602401602060405180830381865afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190611cec565b90505b949350505050565b606060006106d48361055c565b6000815181106106e6576106e6611ca5565b60209081029190910101516040516370a0823160e01b81526001600160a01b038781166004830152909116906370a0823190602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190611cec565b905061076a85858584610f2a565b95945050505050565b606061078186848785611264565b9695505050505050565b6000826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103539190611cec565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009186918691908316906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051e9190611cec565b604080516001808252818301909252606091816020015b606081526020019060019003908161087f579050506040516024810184905260016044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b0316631c683a1b60e11b17905290516108e693929101611d05565b6040516020818303038152906040528160008151811061090857610908611ca5565b6020026020010181905250949350505050565b60006106bf848484610a08565b604080516001808252818301909252606091816020015b606081526020019060019003908161093f579050506040516001600160a01b0385166024820152909150829060440160408051601f19818403018152918152602080830180516001600160e01b0316634274debf60e11b17905290516109a793929101611d05565b604051602081830303815290604052816000815181106109c9576109c9611ca5565b602002602001018190525092915050565b600160205281600052604060002081600881106109f657600080fd5b01546001600160a01b03169150829050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190611cec565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d29565b6001600160a01b0316336001600160a01b031614610b245760405162461bcd60e51b8152600401610b1b90611d46565b60405180910390fd5b8251825181148015610b365750815181145b610b6c5760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610ca357610ba3858281518110610b8c57610b8c611ca5565b60200260200101516001600160a01b03163b151590565b610bbf5760405162461bcd60e51b8152600401610b1b90611d7d565b610bd4838281518110610b8c57610b8c611ca5565b610bf05760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610c0257610c02611ca5565b602002602001015160016000878481518110610c2057610c20611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020858381518110610c5a57610c5a611ca5565b602002602001015160088110610c7257610c72611ca5565b0180546001600160a01b0319166001600160a01b039290921691909117905580610c9b81611cd1565b915050610b6f565b5050505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f9190611d29565b6001600160a01b0316336001600160a01b031614610d4f5760405162461bcd60e51b8152600401610b1b90611d46565b6001600160a01b0381163b610d765760405162461bcd60e51b8152600401610b1b90611d7d565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611d29565b6001600160a01b0316336001600160a01b031614610e3d5760405162461bcd60e51b8152600401610b1b90611d46565b815181518114610e795760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610f2457610e99848281518110610b8c57610b8c611ca5565b610eb55760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610ec757610ec7611ca5565b602002602001015160026000868481518110610ee557610ee5611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610f1c90611cd1565b915050610e7c565b50505050565b60606106bc85610f398561055c565b600081518110610f4b57610f4b611ca5565b60200260200101518685611264565b60408051600380825260808201909252606091816020015b6060815260200190600190039081610f72575050604080516001600160a01b038616602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929350610fe192879201611d05565b6040516020818303038152906040528160008151811061100357611003611ca5565b602090810291909101810191909152604080516001600160a01b03861660248201526044808201869052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516110669287929101611d05565b6040516020818303038152906040528160018151811061108857611088611ca5565b6020908102919091010152604051602481018390526001600160a01b038616604482015260016064820152839060840160408051601f19818403018152918152602080830180516001600160e01b03166383df674760e01b17905290516110f193929101611d05565b6040516020818303038152906040528160028151811061090857610908611ca5565b60008061112186868661091b565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190611d29565b816000815181106111c5576111c5611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009182918691908216906370a0823190602401602060405180830381865afa158015611240573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039e9190611cec565b606081156106bf57600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846112938888611528565b6040518363ffffffff1660e01b81526004016112b0929190611da2565b600060405180830381865afa1580156112cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f59190810190611dbb565b9050600081600183516113089190611e4c565b8151811061131857611318611ca5565b6020026020010151111561151f576040805160038082526080820190925290816020015b606081526020019060019003908161133c5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b17905291519294506113b692889201611d05565b604051602081830303815290604052826000815181106113d8576113d8611ca5565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516114469288929101611d05565b6040516020818303038152906040528260018151811061146857611468611ca5565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed173985600061149b8a8a611528565b8b6000196040516024016114b3959493929190611e63565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506040516020016114f1929190611d05565b6040516020818303038152906040528260028151811061151357611513611ca5565b60200260200101819052505b50949350505050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf127014156115f0576040805160028082526060820183529091602083019080368337019050509050828160008151811061158357611583611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106115cb576115cb611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050610464565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611691576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061165d5761165d611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816001815181106115cb576115cb611ca5565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106116c6576116c6611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061170e5761170e611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816002815181106111c5576111c5611ca5565b6001600160a01b038116811461175757600080fd5b50565b60006020828403121561176c57600080fd5b813561035381611742565b600081518084526020808501945080840160005b838110156117b05781516001600160a01b03168752958201959082019060010161178b565b509495945050505050565b6020815260006103536020830184611777565b600080600080608085870312156117e457600080fd5b84356117ef81611742565b935060208501356117ff81611742565b9250604085013561180f81611742565b9150606085013561181f81611742565b939692955090935050565b6000815180845260005b8181101561185057602081850181015186830182015201611834565b81811115611862576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156118cc57603f198886030184526118ba85835161182a565b9450928501929085019060010161189e565b5092979650505050505050565b6000806000606084860312156118ee57600080fd5b83356118f981611742565b9250602084013561190981611742565b9150604084013561191981611742565b809150509250925092565b600080600080600060a0868803121561193c57600080fd5b853561194781611742565b9450602086013561195781611742565b9350604086013561196781611742565b9250606086013561197781611742565b949793965091946080013592915050565b6000806040838503121561199b57600080fd5b82356119a681611742565b915060208301356119b681611742565b809150509250929050565b600080600080608085870312156119d757600080fd5b84356119e281611742565b935060208501356119f281611742565b92506040850135611a0281611742565b9396929550929360600135925050565b60008060408385031215611a2557600080fd5b8235611a3081611742565b946020939093013593505050565b600080600060608486031215611a5357600080fd5b8335611a5e81611742565b92506020840135611a6e81611742565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611abe57611abe611a7f565b604052919050565b600067ffffffffffffffff821115611ae057611ae0611a7f565b5060051b60200190565b600082601f830112611afb57600080fd5b81356020611b10611b0b83611ac6565b611a95565b82815260059290921b84018101918181019086841115611b2f57600080fd5b8286015b84811015611b53578035611b4681611742565b8352918301918301611b33565b509695505050505050565b600082601f830112611b6f57600080fd5b81356020611b7f611b0b83611ac6565b82815260059290921b84018101918181019086841115611b9e57600080fd5b8286015b84811015611b535780358352918301918301611ba2565b600080600060608486031215611bce57600080fd5b833567ffffffffffffffff80821115611be657600080fd5b611bf287838801611aea565b94506020860135915080821115611c0857600080fd5b611c1487838801611b5e565b93506040860135915080821115611c2a57600080fd5b50611c3786828701611aea565b9150509250925092565b60008060408385031215611c5457600080fd5b823567ffffffffffffffff80821115611c6c57600080fd5b611c7886838701611aea565b93506020850135915080821115611c8e57600080fd5b50611c9b85828601611b5e565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ce557611ce5611cbb565b5060010190565b600060208284031215611cfe57600080fd5b5051919050565b6001600160a01b03831681526040602082018190526000906106bf9083018461182a565b600060208284031215611d3b57600080fd5b815161035381611742565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b8281526040602082015260006106bf6040830184611777565b60006020808385031215611dce57600080fd5b825167ffffffffffffffff811115611de557600080fd5b8301601f81018513611df657600080fd5b8051611e04611b0b82611ac6565b81815260059190911b82018301908381019087831115611e2357600080fd5b928401925b82841015611e4157835182529284019290840190611e28565b979650505050505050565b600082821015611e5e57611e5e611cbb565b500390565b85815284602082015260a060408201526000611e8260a0830186611777565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061021b5760003560e01c80637707887211610125578063ab74dee1116100ad578063df9357221161007c578063df93572214610510578063e49d5ecc14610523578063ee665bed14610456578063ef856be914610536578063f49307ca1461054957600080fd5b8063ab74dee1146104c0578063b3fe7f5a146104d3578063d463fcf6146104ea578063d74baaf8146104fd57600080fd5b806385541e44116100f457806385541e441461045657806390e616051461046a578063945c91421461047d5780639712048714610498578063a91ee0dc146104ad57600080fd5b806377078872146103ff5780637df50ed81461040d57806381a4af151461042357806384773f251461043657600080fd5b8063489b5295116101a85780636092577911610177578063609257791461039057806364dd5f80146103a35780636667f1a6146103b65780636d267d7c146103d15780636fac53ee146103e457600080fd5b8063489b5295146103325780634ad36e02146103455780634d41a1e51461035a5780634d95cad91461037557600080fd5b806328c1f99b116101ef57806328c1f99b1461028f578063298916b2146102ba5780632de77838146102e057806332da07e2146102f357806336d8bf931461030e57600080fd5b806201b0b61461022057806304b87c4c146102495780630c9d8d5c1461026957806310f1fbe51461027c575b600080fd5b61023361022e36600461175a565b61055c565b60405161024091906117bb565b60405180910390f35b61025c6102573660046117ce565b610644565b6040516102409190611877565b61025c6102773660046118d9565b6106c7565b61025c61028a366004611924565b610773565b6000546102a2906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6102d26102c83660046117ce565b6000949350505050565b604051908152602001610240565b6102d26102ee366004611988565b61078b565b6102a273ffbacce0cc7c19d46132f1258fc16cf6871d153c81565b61032261031c36600461175a565b50600090565b6040519015158152602001610240565b61025c6103403660046118d9565b6107ef565b6102d26103533660046119c1565b9392505050565b6102a273a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b6102a2730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61025c61039e3660046119c1565b610868565b6102d26103b13660046118d9565b61091b565b6102a27319793b454d3afc7b454f206ffe95ade26ca6912c81565b61025c6103df366004611988565b610928565b6102a273b0a366b987d77b5ed5803cbd95c80bb6deab48c081565b6102a261031c36600461175a565b61025c61041b366004611988565b606092915050565b6102a2610431366004611a12565b6109da565b6102d261044436600461175a565b60026020526000908152604090205481565b6102d2610464366004611a3e565b92915050565b6102d26104783660046118d9565b610a08565b6102a273172370d5cd63279efa6d502dab29171933a610af81565b6104ab6104a6366004611bb9565b610a76565b005b6104ab6104bb36600461175a565b610caa565b6104ab6104ce366004611c41565b610d98565b6102d26104e13660046118d9565b60009392505050565b61025c6104f83660046119c1565b610f2a565b6102a261050b366004611988565b919050565b61025c61051e3660046119c1565b610f5a565b6103226105313660046119c1565b611113565b610233610544366004611988565b61112e565b61025c6105573660046118d9565b6111eb565b6001600160a01b0381166000908152600260205260409020546060908067ffffffffffffffff81111561059157610591611a7f565b6040519080825280602002602001820160405280156105ba578160200160208202803683370190505b50915060005b8181101561063d576001600160a01b038416600090815260016020526040902081600881106105f1576105f1611ca5565b015483516001600160a01b039091169084908390811061061357610613611ca5565b6001600160a01b03909216602092830291909101909101528061063581611cd1565b9150506105c0565b5050919050565b6040516370a0823160e01b81526001600160a01b0380861660048301526060916106bc91879187918791908716906370a0823190602401602060405180830381865afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190611cec565b90505b949350505050565b606060006106d48361055c565b6000815181106106e6576106e6611ca5565b60209081029190910101516040516370a0823160e01b81526001600160a01b038781166004830152909116906370a0823190602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190611cec565b905061076a85858584610f2a565b95945050505050565b606061078186848785611264565b9695505050505050565b6000826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103539190611cec565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009186918691908316906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051e9190611cec565b604080516001808252818301909252606091816020015b606081526020019060019003908161087f579050506040516024810184905260016044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b0316631c683a1b60e11b17905290516108e693929101611d05565b6040516020818303038152906040528160008151811061090857610908611ca5565b6020026020010181905250949350505050565b60006106bf848484610a08565b604080516001808252818301909252606091816020015b606081526020019060019003908161093f579050506040516001600160a01b0385166024820152909150829060440160408051601f19818403018152918152602080830180516001600160e01b0316634274debf60e11b17905290516109a793929101611d05565b604051602081830303815290604052816000815181106109c9576109c9611ca5565b602002602001018190525092915050565b600160205281600052604060002081600881106109f657600080fd5b01546001600160a01b03169150829050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190611cec565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d29565b6001600160a01b0316336001600160a01b031614610b245760405162461bcd60e51b8152600401610b1b90611d46565b60405180910390fd5b8251825181148015610b365750815181145b610b6c5760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610ca357610ba3858281518110610b8c57610b8c611ca5565b60200260200101516001600160a01b03163b151590565b610bbf5760405162461bcd60e51b8152600401610b1b90611d7d565b610bd4838281518110610b8c57610b8c611ca5565b610bf05760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610c0257610c02611ca5565b602002602001015160016000878481518110610c2057610c20611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020858381518110610c5a57610c5a611ca5565b602002602001015160088110610c7257610c72611ca5565b0180546001600160a01b0319166001600160a01b039290921691909117905580610c9b81611cd1565b915050610b6f565b5050505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f9190611d29565b6001600160a01b0316336001600160a01b031614610d4f5760405162461bcd60e51b8152600401610b1b90611d46565b6001600160a01b0381163b610d765760405162461bcd60e51b8152600401610b1b90611d7d565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611d29565b6001600160a01b0316336001600160a01b031614610e3d5760405162461bcd60e51b8152600401610b1b90611d46565b815181518114610e795760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610f2457610e99848281518110610b8c57610b8c611ca5565b610eb55760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610ec757610ec7611ca5565b602002602001015160026000868481518110610ee557610ee5611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610f1c90611cd1565b915050610e7c565b50505050565b60606106bc85610f398561055c565b600081518110610f4b57610f4b611ca5565b60200260200101518685611264565b60408051600380825260808201909252606091816020015b6060815260200190600190039081610f72575050604080516001600160a01b038616602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929350610fe192879201611d05565b6040516020818303038152906040528160008151811061100357611003611ca5565b602090810291909101810191909152604080516001600160a01b03861660248201526044808201869052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516110669287929101611d05565b6040516020818303038152906040528160018151811061108857611088611ca5565b6020908102919091010152604051602481018390526001600160a01b038616604482015260016064820152839060840160408051601f19818403018152918152602080830180516001600160e01b03166383df674760e01b17905290516110f193929101611d05565b6040516020818303038152906040528160028151811061090857610908611ca5565b60008061112186868661091b565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190611d29565b816000815181106111c5576111c5611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009182918691908216906370a0823190602401602060405180830381865afa158015611240573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039e9190611cec565b606081156106bf57600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846112938888611528565b6040518363ffffffff1660e01b81526004016112b0929190611da2565b600060405180830381865afa1580156112cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f59190810190611dbb565b9050600081600183516113089190611e4c565b8151811061131857611318611ca5565b6020026020010151111561151f576040805160038082526080820190925290816020015b606081526020019060019003908161133c5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b17905291519294506113b692889201611d05565b604051602081830303815290604052826000815181106113d8576113d8611ca5565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516114469288929101611d05565b6040516020818303038152906040528260018151811061146857611468611ca5565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed173985600061149b8a8a611528565b8b6000196040516024016114b3959493929190611e63565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506040516020016114f1929190611d05565b6040516020818303038152906040528260028151811061151357611513611ca5565b60200260200101819052505b50949350505050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf127014156115f0576040805160028082526060820183529091602083019080368337019050509050828160008151811061158357611583611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106115cb576115cb611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050610464565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611691576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061165d5761165d611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816001815181106115cb576115cb611ca5565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106116c6576116c6611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061170e5761170e611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816002815181106111c5576111c5611ca5565b6001600160a01b038116811461175757600080fd5b50565b60006020828403121561176c57600080fd5b813561035381611742565b600081518084526020808501945080840160005b838110156117b05781516001600160a01b03168752958201959082019060010161178b565b509495945050505050565b6020815260006103536020830184611777565b600080600080608085870312156117e457600080fd5b84356117ef81611742565b935060208501356117ff81611742565b9250604085013561180f81611742565b9150606085013561181f81611742565b939692955090935050565b6000815180845260005b8181101561185057602081850181015186830182015201611834565b81811115611862576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156118cc57603f198886030184526118ba85835161182a565b9450928501929085019060010161189e565b5092979650505050505050565b6000806000606084860312156118ee57600080fd5b83356118f981611742565b9250602084013561190981611742565b9150604084013561191981611742565b809150509250925092565b600080600080600060a0868803121561193c57600080fd5b853561194781611742565b9450602086013561195781611742565b9350604086013561196781611742565b9250606086013561197781611742565b949793965091946080013592915050565b6000806040838503121561199b57600080fd5b82356119a681611742565b915060208301356119b681611742565b809150509250929050565b600080600080608085870312156119d757600080fd5b84356119e281611742565b935060208501356119f281611742565b92506040850135611a0281611742565b9396929550929360600135925050565b60008060408385031215611a2557600080fd5b8235611a3081611742565b946020939093013593505050565b600080600060608486031215611a5357600080fd5b8335611a5e81611742565b92506020840135611a6e81611742565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611abe57611abe611a7f565b604052919050565b600067ffffffffffffffff821115611ae057611ae0611a7f565b5060051b60200190565b600082601f830112611afb57600080fd5b81356020611b10611b0b83611ac6565b611a95565b82815260059290921b84018101918181019086841115611b2f57600080fd5b8286015b84811015611b53578035611b4681611742565b8352918301918301611b33565b509695505050505050565b600082601f830112611b6f57600080fd5b81356020611b7f611b0b83611ac6565b82815260059290921b84018101918181019086841115611b9e57600080fd5b8286015b84811015611b535780358352918301918301611ba2565b600080600060608486031215611bce57600080fd5b833567ffffffffffffffff80821115611be657600080fd5b611bf287838801611aea565b94506020860135915080821115611c0857600080fd5b611c1487838801611b5e565b93506040860135915080821115611c2a57600080fd5b50611c3786828701611aea565b9150509250925092565b60008060408385031215611c5457600080fd5b823567ffffffffffffffff80821115611c6c57600080fd5b611c7886838701611aea565b93506020850135915080821115611c8e57600080fd5b50611c9b85828601611b5e565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ce557611ce5611cbb565b5060010190565b600060208284031215611cfe57600080fd5b5051919050565b6001600160a01b03831681526040602082018190526000906106bf9083018461182a565b600060208284031215611d3b57600080fd5b815161035381611742565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b8281526040602082015260006106bf6040830184611777565b60006020808385031215611dce57600080fd5b825167ffffffffffffffff811115611de557600080fd5b8301601f81018513611df657600080fd5b8051611e04611b0b82611ac6565b81815260059190911b82018301908381019087831115611e2357600080fd5b928401925b82841015611e4157835182529284019290840190611e28565b979650505050505050565b600082821015611e5e57611e5e611cbb565b500390565b85815284602082015260a060408201526000611e8260a0830186611777565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/CurveStableSwapAdapter.json b/deployments/tenderly-polygon@26874895/CurveStableSwapAdapter.json new file mode 100644 index 000000000..cc106c615 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/CurveStableSwapAdapter.json @@ -0,0 +1,983 @@ +{ + "address": "0x2A68c377a4bca734746D8d1acd6e58dfC4cBD55F", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBTC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aBTCPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "calcWithdrawOneCoinNotSame", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "coins", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noZeroAllowanceAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renBTC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_calcWithdrawOneCoinNotSame", + "type": "bool[]" + } + ], + "name": "setCalcWithdrawOneCoinNotSame", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_noZeroAllowanceAllowed", + "type": "bool[]" + } + ], + "name": "setNoZeroAllowanceAllowed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "int128[]", + "name": "_indexes", + "type": "int128[]" + } + ], + "name": "setTokenIndexes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenIndexes", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "underlyingCoins", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x83fc9819a9fc82841ec0299d169645172b5dfa662d0d4f21b7909f19d8373f0e", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x2A68c377a4bca734746D8d1acd6e58dfC4cBD55F", + "transactionIndex": 0, + "gasUsed": "2958877", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x743478744e41da221b5e29353f7de90ab1c98484bd23f403b961c866dbbc5bf0", + "transactionHash": "0x83fc9819a9fc82841ec0299d169645172b5dfa662d0d4f21b7909f19d8373f0e", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874909, + "transactionHash": "0x83fc9819a9fc82841ec0299d169645172b5dfa662d0d4f21b7909f19d8373f0e", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000002ab48645d903be30000000000000000000000000000000000000000000000002e0feced746c3e000000000000000000000000000000000000000000000009c1484589fa2e6b3e300000000000000000000000000000000000000000000000002e0feced746c3e000000000000000000000000000000000000000000000009c1484589fa2e6b3e30", + "logIndex": 0, + "blockHash": "0x743478744e41da221b5e29353f7de90ab1c98484bd23f403b961c866dbbc5bf0" + } + ], + "blockNumber": 26874909, + "cumulativeGasUsed": "2958877", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x60806040523480156200001157600080fd5b506040516200325938038062003259833981016040819052620000349162000310565b600080546127106001908155600160a01b6001600160a81b03199092166001600160a01b0394909416939093171781557f545a5828ad9cfa94b1985f76572c241942ef8c96c20055464d2a886269db219280546001600160801b03199081169091557fd39204ae963dbdb29c8a7e4ae272e7a25435f88868693ae051bffc92ffe3c65580548216841790557f7d83540524facb2e4471952a8e70ccc214b6dbaa4312d25948e858db32f3c59180546002908316811790915560037f1c0091c5c8a33663b85f7cf7ede7900c37c1b4b840fc29568d3b0a49b807ac99557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606c80546001600160a01b0319908116738f3cf7ad23cd3cadbd9735aff958023239c6a063179091557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606d80548216732791bca1f2de4661ed88a30c99a7a9449aa841741790557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606e8054821673c2132d05d31c914a87c6611c10748aeb04b58e8f1790557f576ab61c2c940e11403b3f907068ed7eb48a4debaac990182c5420c494ef4e008054841690557ff74137c0900ab93eed3bf7ddd12fe2a27d9f746ad1b81a6348d590579e9f5bac805490931690941790915573c2d95eef97ec6c17551d45e77b590dc1f9117c679091527f54b003e60a6a993960fbaa2cd19887526ff2871e49f0ed4b0ceecdd4418124e3557f976e228f930d23f832de6c160bb04b73b1a79f404246a7158d43edeb1533e0338054821673dbf31df14b66535af65aac99c32e9ea844e1450190811790915560076020527f29bb1356bc197d819e4a0cee886e87997c2d3bc5036fa78f91500ac79d5208f480548316731bfd67037b42cf73acf2047067bd4f2c47d9bfd61790557f29bb1356bc197d819e4a0cee886e87997c2d3bc5036fa78f91500ac79d5208f5805490921617905562000342565b6000602082840312156200032357600080fd5b81516001600160a01b03811681146200033b57600080fd5b9392505050565b612f0780620003526000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638ea3b34a11610146578063df935722116100c3578063ee665bed11610087578063ee665bed146105d8578063ef856be9146105eb578063f1aacbb71461060b578063f44941711461061e578063f49307ca14610641578063fc4773431461065457600080fd5b8063df93572214610561578063e0bab4c414610574578063e13e18521461058f578063e49d5ecc146105aa578063e595cbb6146105bd57600080fd5b8063c42fa7f41161010a578063c42fa7f4146104ed578063c54e44eb14610500578063d64410461461051b578063d74baaf81461053b578063da699f961461054e57600080fd5b80638ea3b34a1461048e57806390e61605146104a1578063919b69d7146104b4578063a6016c94146104c7578063a91ee0dc146104da57600080fd5b80634dede3de116101d457806364dd5f801161019857806364dd5f801461042c578063770788721461043f5780637c47b3f41461044d57806385541e441461046057806389a302711461047357600080fd5b80634dede3de146103a35780634f83b52d146103be5780635bd83d1c146103de5780635fbc1031146103fe578063609257791461041957600080fd5b80632af06b961161021b5780632af06b96146103285780632de778381461034957806336d8bf931461035c578063489b5295146103705780634ad36e021461039057600080fd5b8063191c194b146102585780631b6486d6146102745780631c9f99e4146102b55780632390db2d146102ca57806328c1f99b146102fd575b600080fd5b61026160015481565b6040519081526020015b60405180910390f35b6102a26102823660046125f0565b6004602090815260009283526040808420909152908252902054600f0b81565b604051600f9190910b815260200161026b565b6102c86102c3366004612708565b610667565b005b6102ed6102d83660046127f6565b60096020526000908152604090205460ff1681565b604051901515815260200161026b565b600054610310906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b60005461033c90600160a01b900460ff1681565b60405161026b9190612829565b6102616103573660046125f0565b61089f565b6102ed61036a3660046127f6565b50600090565b61038361037e366004612851565b61099c565b60405161026b91906128e9565b61026161039e36600461294b565b610a20565b610310731bfd67037b42cf73acf2047067bd4f2c47d9bfd681565b6102616103cc3660046127f6565b60036020526000908152604090205481565b6102616103ec3660046127f6565b60056020526000908152604090205481565b61031073dbf31df14b66535af65aac99c32e9ea844e1450181565b61038361042736600461294b565b610a6c565b61026161043a366004612851565b610ca0565b61031061036a3660046127f6565b6102c861045b36600461299c565b610cb2565b61026161046e3660046129bd565b610dcd565b610310732791bca1f2de4661ed88a30c99a7a9449aa8417481565b61031061049c3660046129fe565b611060565b6102616104af366004612851565b61108e565b6102c86104c23660046129fe565b611107565b6102c86104d5366004612a2a565b61121c565b6102c86104e83660046127f6565b611399565b6103106104fb3660046129fe565b611487565b61031073c2132d05d31c914a87c6611c10748aeb04b58e8f81565b6102616105293660046127f6565b60026020526000908152604090205481565b6103106105493660046125f0565b6114a3565b6102c861055c366004612af4565b611507565b61038361056f36600461294b565b6115e1565b610310738f3cf7ad23cd3cadbd9735aff958023239c6a06381565b61031073c2d95eef97ec6c17551d45e77b590dc1f9117c6781565b6102ed6105b836600461294b565b6115f7565b61031073445fe580ef8d70ff569ab36e80c647af338db35181565b6102616105e63660046129bd565b611612565b6105fe6105f93660046125f0565b61176f565b60405161026b9190612b0d565b6102c86106193660046129bd565b61188b565b6102ed61062c3660046127f6565b60086020526000908152604090205460ff1681565b61038361064f366004612851565b6119a1565b6102c8610662366004612a2a565b6119b4565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106dc9190612b5a565b6001600160a01b0316336001600160a01b0316146107155760405162461bcd60e51b815260040161070c90612b77565b60405180910390fd5b82518251811480156107275750815181145b6107435760405162461bcd60e51b815260040161070c90612bae565b60005b818110156108985761077a85828151811061076357610763612bcf565b60200260200101516001600160a01b03163b151590565b6107965760405162461bcd60e51b815260040161070c90612be5565b6107ab84828151811061076357610763612bcf565b6107c75760405162461bcd60e51b815260040161070c90612be5565b8281815181106107d9576107d9612bcf565b6020026020010151600460008784815181106107f7576107f7612bcf565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600086848151811061083357610833612bcf565b6020908102919091018101516001600160a01b0316825281019190915260400160002080546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff929092169190911790558061089081612c20565b915050610746565b5050505050565b600080836001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190612c3b565b9050600061091185611afa565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190612c3b565b9050670de0b6b3a76400006109878284612c54565b6109919190612c73565b925050505b92915050565b6040516370a0823160e01b81526001600160a01b038481166004830152606091610a1691859185918316906370a0823190602401602060405180830381865afa1580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190612c3b565b611b5e565b90505b9392505050565b600080610a2e86868661108e565b90506000610a3d878787610ca0565b905080610a4a8584612c54565b610a549190612c73565b610a5f906001612c95565b925050505b949350505050565b60608115610a64576000610a816000856114a3565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610a99575050604080516001600160a01b038716602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929450610b0892849201612cad565b60405160208183030381529060405282600081518110610b2a57610b2a612bcf565b602090810291909101810191909152604080516001600160a01b03871660248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b1790529051610b8d9284929101612cad565b60405160208183030381529060405282600181518110610baf57610baf612bcf565b6020908102919091018101919091526001600160a01b03808616600090815260048352604080822092891682529190925290205484908490600f0b6064610bf7898585611612565b610c0290605f612c54565b610c0c9190612c73565b6040516024810193909352600f9190910b604483015260648201526001608482015260a40160408051601f19818403018152918152602080830180516001600160e01b031663517a55a360e01b1790529051610c6a93929101612cad565b60405160208183030381529060405282600281518110610c8c57610c8c612bcf565b602002602001018190525050949350505050565b6000610a1683836105e687878761108e565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d279190612b5a565b6001600160a01b0316336001600160a01b031614610d575760405162461bcd60e51b815260040161070c90612cd1565b6000805482919060ff60a01b1916600160a01b836001811115610d7c57610d7c612813565b02179055506000543390600160a01b900460ff166001811115610da157610da1612813565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b60008115611056576001600160a01b038316600090815260056020908152604080832054600790925280832081516101008101928390529293929160089082845b81546001600160a01b03168152600190910190602001808311610e0e575050505050905060008267ffffffffffffffff811115610e4d57610e4d612629565b604051908082528060200260200182016040528015610e76578160200160208202803683370190505b50905060005b83811015610ee657876001600160a01b0316838260088110610ea057610ea0612bcf565b60200201516001600160a01b03161415610ed45785828281518110610ec757610ec7612bcf565b6020026020010181815250505b80610ede81612c20565b915050610e7c565b508260021415610fb257856001600160a01b031663ed8e84f3604051806040016040528084600081518110610f1d57610f1d612bcf565b6020026020010151815260200184600181518110610f3d57610f3d612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d2b565b602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190612c3b565b9350505050610a19565b826003141561105257856001600160a01b0316633883e119604051806060016040528084600081518110610fe857610fe8612bcf565b602002602001015181526020018460018151811061100857611008612bcf565b602002602001015181526020018460028151811061102857611028612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d6b565b5050505b5060009392505050565b6007602052816000526040600020816008811061107c57600080fd5b01546001600160a01b03169150829050565b600061109b6000836114a3565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612c3b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117c9190612b5a565b6001600160a01b0316336001600160a01b0316146111ac5760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0382163b6111d35760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190612b5a565b6001600160a01b0316336001600160a01b0316146112c15760405162461bcd60e51b815260040161070c90612b77565b8151815181146112e35760405162461bcd60e51b815260040161070c90612bae565b60005b818110156113935761130384828151811061076357610763612bcf565b61131f5760405162461bcd60e51b815260040161070c90612be5565b82818151811061133157611331612bcf565b60200260200101516008600086848151811061134f5761134f612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061138b81612c20565b9150506112e6565b50505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612b5a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b815260040161070c90612b77565b6001600160a01b0381163b6114655760405162461bcd60e51b815260040161070c90612be5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6006602052816000526040600020816008811061107c57600080fd5b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190612b5a565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157c9190612b5a565b6001600160a01b0316336001600160a01b0316146115ac5760405162461bcd60e51b815260040161070c90612cd1565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606115ee848484611b5e565b95945050505050565b600080611605868686610ca0565b9092111595945050505050565b60008115611056576001600160a01b03831660009081526009602052604090205460ff166116d0576001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163cc2b27d760e01b8152908101859052600f9290920b60248301529063cc2b27d790604401602060405180830381865afa1580156116a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cb9190612c3b565b611768565b6001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163314ca9dd60e21b8152908101859052600f9290920b6024830152600160448301529063c532a77490606401602060405180830381865afa158015611744573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117689190612c3b565b9050610a19565b6001600160a01b03821660009081526007602052604080822081516101008101928390526060939290919060089082845b81546001600160a01b031681526001909101906020018083116117a0575050506001600160a01b0387166000908152600560205260409020549293508291505067ffffffffffffffff8111156117f8576117f8612629565b604051908082528060200260200182016040528015611821578160200160208202803683370190505b50925060005b818110156118825782816008811061184157611841612bcf565b602002015184828151811061185857611858612bcf565b6001600160a01b03909216602092830291909101909101528061187a81612c20565b915050611827565b50505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190612b5a565b6001600160a01b0316336001600160a01b0316146119305760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0383163b6119575760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03831660009081526002602052604080822083905551339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b6060610a1684848461042788888861108e565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612b5a565b6001600160a01b0316336001600160a01b031614611a595760405162461bcd60e51b815260040161070c90612b77565b815181518114611a7b5760405162461bcd60e51b815260040161070c90612bae565b60005b8181101561139357828181518110611a9857611a98612bcf565b602002602001015160096000868481518110611ab657611ab6612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611af281612c20565b915050611a7e565b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190612b5a565b6060600080600080611b718888886121d9565b935093509350935060018111156121ce578067ffffffffffffffff811115611b9b57611b9b612629565b604051908082528060200260200182016040528015611bce57816020015b6060815260200190600190039081611bb95790505b5094506000805b85811015611ee7576000848281518110611bf157611bf1612bcf565b60200260200101511115611ed55760086000868360088110611c1557611c15612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff1615611d2f57848160088110611c5157611c51612bcf565b6020020151858260088110611c6857611c68612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611c8e57611c8e612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611cf2929190612cad565b604051602081830303815290604052878380611d0d90612c20565b945081518110611d1f57611d1f612bcf565b6020026020010181905250611ed5565b848160088110611d4157611d41612bcf565b6020020151858260088110611d5857611d58612bcf565b5050604080516001600160a01b038c16602482015260006044808301919091528251808303909101815260649091018252602081810180516001600160e01b031663095ea7b360e01b1790529151611db1939201612cad565b604051602081830303815290604052878380611dcc90612c20565b945081518110611dde57611dde612bcf565b6020026020010181905250848160088110611dfb57611dfb612bcf565b6020020151858260088110611e1257611e12612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611e3857611e38612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611e9c929190612cad565b604051602081830303815290604052878380611eb790612c20565b945081518110611ec957611ec9612bcf565b60200260200101819052505b80611edf81612c20565b915050611bd5565b50600285141561204c576000604051806040016040528085600081518110611f1157611f11612bcf565b6020026020010151815260200185600181518110611f3157611f31612bcf565b60200260200101518152509050600060648a6001600160a01b031663ed8e84f38460016040518363ffffffff1660e01b8152600401611f71929190612d2b565b602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612c3b565b611fbd90605f612c54565b611fc79190612c73565b90508982826001604051602401611fe093929190612d88565b60408051601f19818403018152918152602080830180516001600160e01b031663ee22be2360e01b179052905161201993929101612cad565b60405160208183030381529060405288848151811061203a5761203a612bcf565b602002602001018190525050506121cc565b60038514156121cc57600060405180606001604052808560008151811061207557612075612bcf565b602002602001015181526020018560018151811061209557612095612bcf565b60200260200101518152602001856002815181106120b5576120b5612bcf565b60200260200101518152509050600060648a6001600160a01b0316633883e1198460016040518363ffffffff1660e01b81526004016120f5929190612d6b565b602060405180830381865afa158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190612c3b565b61214190605f612c54565b61214b9190612c73565b9050898282600160405160240161216493929190612dac565b60408051601f19818403018152918152602080830180516001600160e01b03166315b74c9d60e11b179052905161219d93929101612cad565b6040516020818303038152906040528884815181106121be576121be612bcf565b602002602001018190525050505b505b505050509392505050565b60006121e36125b9565b6001600160a01b03841660009081526005602090815260408083205460079092528083208151610100810192839052929550606093929160089082845b81546001600160a01b0316815260019091019060200180831161222057505050505092508367ffffffffffffffff81111561225d5761225d612629565b604051908082528060200260200182016040528015612286578160200160208202803683370190505b50915060005b8481101561237957876001600160a01b03168482600881106122b0576122b0612bcf565b60200201516001600160a01b03161415612367576122d98789886122d48b8d61089f565b612383565b8382815181106122eb576122eb612bcf565b602002602001018181525050600083828151811061230b5761230b612bcf565b60200260200101511115612367576008600085836008811061232f5761232f612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156123625760029150612367565b600391505b8061237181612c20565b91505061228c565b5093509350935093565b60006001600054600160a01b900460ff1660018111156123a5576123a5612813565b146123ba576123b58585856123c6565b6115ee565b6115ee85858585612486565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242b9190612dd0565b60ff169050600061243d826012612df3565b61244890600a612eee565b6001600160a01b03871660009081526002602052604090205461246b9190612c73565b905080841161247a578361247c565b805b9695505050505050565b60008060036000876001600160a01b03166001600160a01b031681526020019081526020016000205490506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190612dd0565b60ff1690506000612527826012612df3565b61253290600a612eee565b61253c9087612c54565b905060008315612562576127106125538588612c54565b61255d9190612c73565b61257d565b612710600154876125739190612c54565b61257d9190612c73565b905080821161258c57866125ac565b612597836012612df3565b6125a290600a612eee565b6125ac9082612c73565b9998505050505050505050565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b03811681146125ed57600080fd5b50565b6000806040838503121561260357600080fd5b823561260e816125d8565b9150602083013561261e816125d8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561266857612668612629565b604052919050565b600067ffffffffffffffff82111561268a5761268a612629565b5060051b60200190565b600082601f8301126126a557600080fd5b813560206126ba6126b583612670565b61263f565b82815260059290921b840181019181810190868411156126d957600080fd5b8286015b848110156126fd5780356126f0816125d8565b83529183019183016126dd565b509695505050505050565b60008060006060848603121561271d57600080fd5b833567ffffffffffffffff8082111561273557600080fd5b61274187838801612694565b945060209150818601358181111561275857600080fd5b61276488828901612694565b94505060408601358181111561277957600080fd5b86019050601f8101871361278c57600080fd5b803561279a6126b582612670565b81815260059190911b820183019083810190898311156127b957600080fd5b928401925b828410156127e757833580600f0b81146127d85760008081fd5b825292840192908401906127be565b80955050505050509250925092565b60006020828403121561280857600080fd5b8135610a19816125d8565b634e487b7160e01b600052602160045260246000fd5b602081016002831061284b57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561286657600080fd5b8335612871816125d8565b92506020840135612881816125d8565b91506040840135612891816125d8565b809150509250925092565b6000815180845260005b818110156128c2576020818501810151868301820152016128a6565b818111156128d4576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561293e57603f1988860301845261292c85835161289c565b94509285019290850190600101612910565b5092979650505050505050565b6000806000806080858703121561296157600080fd5b843561296c816125d8565b9350602085013561297c816125d8565b9250604085013561298c816125d8565b9396929550929360600135925050565b6000602082840312156129ae57600080fd5b813560028110610a1957600080fd5b6000806000606084860312156129d257600080fd5b83356129dd816125d8565b925060208401356129ed816125d8565b929592945050506040919091013590565b60008060408385031215612a1157600080fd5b8235612a1c816125d8565b946020939093013593505050565b60008060408385031215612a3d57600080fd5b823567ffffffffffffffff80821115612a5557600080fd5b612a6186838701612694565b9350602091508185013581811115612a7857600080fd5b85019050601f81018613612a8b57600080fd5b8035612a996126b582612670565b81815260059190911b82018301908381019088831115612ab857600080fd5b928401925b82841015612ae55783358015158114612ad65760008081fd5b82529284019290840190612abd565b80955050505050509250929050565b600060208284031215612b0657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b4e5783516001600160a01b031683529284019291840191600101612b29565b50909695505050505050565b600060208284031215612b6c57600080fd5b8151610a19816125d8565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b602080825260079082015266042d8cadccee8d60cb1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612c3457612c34612c0a565b5060010190565b600060208284031215612c4d57600080fd5b5051919050565b6000816000190483118215151615612c6e57612c6e612c0a565b500290565b600082612c9057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ca857612ca8612c0a565b500190565b6001600160a01b0383168152604060208201819052600090610a169083018461289c565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b8060005b6002811015611393578151845260209384019390910190600101612d0c565b60608101612d398285612d08565b82151560408301529392505050565b8060005b6003811015611393578151845260209384019390910190600101612d4c565b60808101612d798285612d48565b82151560608301529392505050565b60808101612d968286612d08565b8360408301528215156060830152949350505050565b60a08101612dba8286612d48565b8360608301528215156080830152949350505050565b600060208284031215612de257600080fd5b815160ff81168114610a1957600080fd5b600082821015612e0557612e05612c0a565b500390565b600181815b80851115612e45578160001904821115612e2b57612e2b612c0a565b80851615612e3857918102915b93841c9390800290612e0f565b509250929050565b600082612e5c57506001610996565b81612e6957506000610996565b8160018114612e7f5760028114612e8957612ea5565b6001915050610996565b60ff841115612e9a57612e9a612c0a565b50506001821b610996565b5060208310610133831016604e8410600b8410161715612ec8575081810a610996565b612ed28383612e0a565b8060001904821115612ee657612ee6612c0a565b029392505050565b6000610a198383612e4d56fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102535760003560e01c80638ea3b34a11610146578063df935722116100c3578063ee665bed11610087578063ee665bed146105d8578063ef856be9146105eb578063f1aacbb71461060b578063f44941711461061e578063f49307ca14610641578063fc4773431461065457600080fd5b8063df93572214610561578063e0bab4c414610574578063e13e18521461058f578063e49d5ecc146105aa578063e595cbb6146105bd57600080fd5b8063c42fa7f41161010a578063c42fa7f4146104ed578063c54e44eb14610500578063d64410461461051b578063d74baaf81461053b578063da699f961461054e57600080fd5b80638ea3b34a1461048e57806390e61605146104a1578063919b69d7146104b4578063a6016c94146104c7578063a91ee0dc146104da57600080fd5b80634dede3de116101d457806364dd5f801161019857806364dd5f801461042c578063770788721461043f5780637c47b3f41461044d57806385541e441461046057806389a302711461047357600080fd5b80634dede3de146103a35780634f83b52d146103be5780635bd83d1c146103de5780635fbc1031146103fe578063609257791461041957600080fd5b80632af06b961161021b5780632af06b96146103285780632de778381461034957806336d8bf931461035c578063489b5295146103705780634ad36e021461039057600080fd5b8063191c194b146102585780631b6486d6146102745780631c9f99e4146102b55780632390db2d146102ca57806328c1f99b146102fd575b600080fd5b61026160015481565b6040519081526020015b60405180910390f35b6102a26102823660046125f0565b6004602090815260009283526040808420909152908252902054600f0b81565b604051600f9190910b815260200161026b565b6102c86102c3366004612708565b610667565b005b6102ed6102d83660046127f6565b60096020526000908152604090205460ff1681565b604051901515815260200161026b565b600054610310906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b60005461033c90600160a01b900460ff1681565b60405161026b9190612829565b6102616103573660046125f0565b61089f565b6102ed61036a3660046127f6565b50600090565b61038361037e366004612851565b61099c565b60405161026b91906128e9565b61026161039e36600461294b565b610a20565b610310731bfd67037b42cf73acf2047067bd4f2c47d9bfd681565b6102616103cc3660046127f6565b60036020526000908152604090205481565b6102616103ec3660046127f6565b60056020526000908152604090205481565b61031073dbf31df14b66535af65aac99c32e9ea844e1450181565b61038361042736600461294b565b610a6c565b61026161043a366004612851565b610ca0565b61031061036a3660046127f6565b6102c861045b36600461299c565b610cb2565b61026161046e3660046129bd565b610dcd565b610310732791bca1f2de4661ed88a30c99a7a9449aa8417481565b61031061049c3660046129fe565b611060565b6102616104af366004612851565b61108e565b6102c86104c23660046129fe565b611107565b6102c86104d5366004612a2a565b61121c565b6102c86104e83660046127f6565b611399565b6103106104fb3660046129fe565b611487565b61031073c2132d05d31c914a87c6611c10748aeb04b58e8f81565b6102616105293660046127f6565b60026020526000908152604090205481565b6103106105493660046125f0565b6114a3565b6102c861055c366004612af4565b611507565b61038361056f36600461294b565b6115e1565b610310738f3cf7ad23cd3cadbd9735aff958023239c6a06381565b61031073c2d95eef97ec6c17551d45e77b590dc1f9117c6781565b6102ed6105b836600461294b565b6115f7565b61031073445fe580ef8d70ff569ab36e80c647af338db35181565b6102616105e63660046129bd565b611612565b6105fe6105f93660046125f0565b61176f565b60405161026b9190612b0d565b6102c86106193660046129bd565b61188b565b6102ed61062c3660046127f6565b60086020526000908152604090205460ff1681565b61038361064f366004612851565b6119a1565b6102c8610662366004612a2a565b6119b4565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106dc9190612b5a565b6001600160a01b0316336001600160a01b0316146107155760405162461bcd60e51b815260040161070c90612b77565b60405180910390fd5b82518251811480156107275750815181145b6107435760405162461bcd60e51b815260040161070c90612bae565b60005b818110156108985761077a85828151811061076357610763612bcf565b60200260200101516001600160a01b03163b151590565b6107965760405162461bcd60e51b815260040161070c90612be5565b6107ab84828151811061076357610763612bcf565b6107c75760405162461bcd60e51b815260040161070c90612be5565b8281815181106107d9576107d9612bcf565b6020026020010151600460008784815181106107f7576107f7612bcf565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600086848151811061083357610833612bcf565b6020908102919091018101516001600160a01b0316825281019190915260400160002080546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff929092169190911790558061089081612c20565b915050610746565b5050505050565b600080836001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190612c3b565b9050600061091185611afa565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190612c3b565b9050670de0b6b3a76400006109878284612c54565b6109919190612c73565b925050505b92915050565b6040516370a0823160e01b81526001600160a01b038481166004830152606091610a1691859185918316906370a0823190602401602060405180830381865afa1580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190612c3b565b611b5e565b90505b9392505050565b600080610a2e86868661108e565b90506000610a3d878787610ca0565b905080610a4a8584612c54565b610a549190612c73565b610a5f906001612c95565b925050505b949350505050565b60608115610a64576000610a816000856114a3565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610a99575050604080516001600160a01b038716602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929450610b0892849201612cad565b60405160208183030381529060405282600081518110610b2a57610b2a612bcf565b602090810291909101810191909152604080516001600160a01b03871660248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b1790529051610b8d9284929101612cad565b60405160208183030381529060405282600181518110610baf57610baf612bcf565b6020908102919091018101919091526001600160a01b03808616600090815260048352604080822092891682529190925290205484908490600f0b6064610bf7898585611612565b610c0290605f612c54565b610c0c9190612c73565b6040516024810193909352600f9190910b604483015260648201526001608482015260a40160408051601f19818403018152918152602080830180516001600160e01b031663517a55a360e01b1790529051610c6a93929101612cad565b60405160208183030381529060405282600281518110610c8c57610c8c612bcf565b602002602001018190525050949350505050565b6000610a1683836105e687878761108e565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d279190612b5a565b6001600160a01b0316336001600160a01b031614610d575760405162461bcd60e51b815260040161070c90612cd1565b6000805482919060ff60a01b1916600160a01b836001811115610d7c57610d7c612813565b02179055506000543390600160a01b900460ff166001811115610da157610da1612813565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b60008115611056576001600160a01b038316600090815260056020908152604080832054600790925280832081516101008101928390529293929160089082845b81546001600160a01b03168152600190910190602001808311610e0e575050505050905060008267ffffffffffffffff811115610e4d57610e4d612629565b604051908082528060200260200182016040528015610e76578160200160208202803683370190505b50905060005b83811015610ee657876001600160a01b0316838260088110610ea057610ea0612bcf565b60200201516001600160a01b03161415610ed45785828281518110610ec757610ec7612bcf565b6020026020010181815250505b80610ede81612c20565b915050610e7c565b508260021415610fb257856001600160a01b031663ed8e84f3604051806040016040528084600081518110610f1d57610f1d612bcf565b6020026020010151815260200184600181518110610f3d57610f3d612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d2b565b602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190612c3b565b9350505050610a19565b826003141561105257856001600160a01b0316633883e119604051806060016040528084600081518110610fe857610fe8612bcf565b602002602001015181526020018460018151811061100857611008612bcf565b602002602001015181526020018460028151811061102857611028612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d6b565b5050505b5060009392505050565b6007602052816000526040600020816008811061107c57600080fd5b01546001600160a01b03169150829050565b600061109b6000836114a3565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612c3b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117c9190612b5a565b6001600160a01b0316336001600160a01b0316146111ac5760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0382163b6111d35760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190612b5a565b6001600160a01b0316336001600160a01b0316146112c15760405162461bcd60e51b815260040161070c90612b77565b8151815181146112e35760405162461bcd60e51b815260040161070c90612bae565b60005b818110156113935761130384828151811061076357610763612bcf565b61131f5760405162461bcd60e51b815260040161070c90612be5565b82818151811061133157611331612bcf565b60200260200101516008600086848151811061134f5761134f612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061138b81612c20565b9150506112e6565b50505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612b5a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b815260040161070c90612b77565b6001600160a01b0381163b6114655760405162461bcd60e51b815260040161070c90612be5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6006602052816000526040600020816008811061107c57600080fd5b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190612b5a565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157c9190612b5a565b6001600160a01b0316336001600160a01b0316146115ac5760405162461bcd60e51b815260040161070c90612cd1565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606115ee848484611b5e565b95945050505050565b600080611605868686610ca0565b9092111595945050505050565b60008115611056576001600160a01b03831660009081526009602052604090205460ff166116d0576001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163cc2b27d760e01b8152908101859052600f9290920b60248301529063cc2b27d790604401602060405180830381865afa1580156116a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cb9190612c3b565b611768565b6001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163314ca9dd60e21b8152908101859052600f9290920b6024830152600160448301529063c532a77490606401602060405180830381865afa158015611744573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117689190612c3b565b9050610a19565b6001600160a01b03821660009081526007602052604080822081516101008101928390526060939290919060089082845b81546001600160a01b031681526001909101906020018083116117a0575050506001600160a01b0387166000908152600560205260409020549293508291505067ffffffffffffffff8111156117f8576117f8612629565b604051908082528060200260200182016040528015611821578160200160208202803683370190505b50925060005b818110156118825782816008811061184157611841612bcf565b602002015184828151811061185857611858612bcf565b6001600160a01b03909216602092830291909101909101528061187a81612c20565b915050611827565b50505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190612b5a565b6001600160a01b0316336001600160a01b0316146119305760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0383163b6119575760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03831660009081526002602052604080822083905551339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b6060610a1684848461042788888861108e565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612b5a565b6001600160a01b0316336001600160a01b031614611a595760405162461bcd60e51b815260040161070c90612b77565b815181518114611a7b5760405162461bcd60e51b815260040161070c90612bae565b60005b8181101561139357828181518110611a9857611a98612bcf565b602002602001015160096000868481518110611ab657611ab6612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611af281612c20565b915050611a7e565b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190612b5a565b6060600080600080611b718888886121d9565b935093509350935060018111156121ce578067ffffffffffffffff811115611b9b57611b9b612629565b604051908082528060200260200182016040528015611bce57816020015b6060815260200190600190039081611bb95790505b5094506000805b85811015611ee7576000848281518110611bf157611bf1612bcf565b60200260200101511115611ed55760086000868360088110611c1557611c15612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff1615611d2f57848160088110611c5157611c51612bcf565b6020020151858260088110611c6857611c68612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611c8e57611c8e612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611cf2929190612cad565b604051602081830303815290604052878380611d0d90612c20565b945081518110611d1f57611d1f612bcf565b6020026020010181905250611ed5565b848160088110611d4157611d41612bcf565b6020020151858260088110611d5857611d58612bcf565b5050604080516001600160a01b038c16602482015260006044808301919091528251808303909101815260649091018252602081810180516001600160e01b031663095ea7b360e01b1790529151611db1939201612cad565b604051602081830303815290604052878380611dcc90612c20565b945081518110611dde57611dde612bcf565b6020026020010181905250848160088110611dfb57611dfb612bcf565b6020020151858260088110611e1257611e12612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611e3857611e38612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611e9c929190612cad565b604051602081830303815290604052878380611eb790612c20565b945081518110611ec957611ec9612bcf565b60200260200101819052505b80611edf81612c20565b915050611bd5565b50600285141561204c576000604051806040016040528085600081518110611f1157611f11612bcf565b6020026020010151815260200185600181518110611f3157611f31612bcf565b60200260200101518152509050600060648a6001600160a01b031663ed8e84f38460016040518363ffffffff1660e01b8152600401611f71929190612d2b565b602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612c3b565b611fbd90605f612c54565b611fc79190612c73565b90508982826001604051602401611fe093929190612d88565b60408051601f19818403018152918152602080830180516001600160e01b031663ee22be2360e01b179052905161201993929101612cad565b60405160208183030381529060405288848151811061203a5761203a612bcf565b602002602001018190525050506121cc565b60038514156121cc57600060405180606001604052808560008151811061207557612075612bcf565b602002602001015181526020018560018151811061209557612095612bcf565b60200260200101518152602001856002815181106120b5576120b5612bcf565b60200260200101518152509050600060648a6001600160a01b0316633883e1198460016040518363ffffffff1660e01b81526004016120f5929190612d6b565b602060405180830381865afa158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190612c3b565b61214190605f612c54565b61214b9190612c73565b9050898282600160405160240161216493929190612dac565b60408051601f19818403018152918152602080830180516001600160e01b03166315b74c9d60e11b179052905161219d93929101612cad565b6040516020818303038152906040528884815181106121be576121be612bcf565b602002602001018190525050505b505b505050509392505050565b60006121e36125b9565b6001600160a01b03841660009081526005602090815260408083205460079092528083208151610100810192839052929550606093929160089082845b81546001600160a01b0316815260019091019060200180831161222057505050505092508367ffffffffffffffff81111561225d5761225d612629565b604051908082528060200260200182016040528015612286578160200160208202803683370190505b50915060005b8481101561237957876001600160a01b03168482600881106122b0576122b0612bcf565b60200201516001600160a01b03161415612367576122d98789886122d48b8d61089f565b612383565b8382815181106122eb576122eb612bcf565b602002602001018181525050600083828151811061230b5761230b612bcf565b60200260200101511115612367576008600085836008811061232f5761232f612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156123625760029150612367565b600391505b8061237181612c20565b91505061228c565b5093509350935093565b60006001600054600160a01b900460ff1660018111156123a5576123a5612813565b146123ba576123b58585856123c6565b6115ee565b6115ee85858585612486565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242b9190612dd0565b60ff169050600061243d826012612df3565b61244890600a612eee565b6001600160a01b03871660009081526002602052604090205461246b9190612c73565b905080841161247a578361247c565b805b9695505050505050565b60008060036000876001600160a01b03166001600160a01b031681526020019081526020016000205490506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190612dd0565b60ff1690506000612527826012612df3565b61253290600a612eee565b61253c9087612c54565b905060008315612562576127106125538588612c54565b61255d9190612c73565b61257d565b612710600154876125739190612c54565b61257d9190612c73565b905080821161258c57866125ac565b612597836012612df3565b6125a290600a612eee565b6125ac9082612c73565b9998505050505050505050565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b03811681146125ed57600080fd5b50565b6000806040838503121561260357600080fd5b823561260e816125d8565b9150602083013561261e816125d8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561266857612668612629565b604052919050565b600067ffffffffffffffff82111561268a5761268a612629565b5060051b60200190565b600082601f8301126126a557600080fd5b813560206126ba6126b583612670565b61263f565b82815260059290921b840181019181810190868411156126d957600080fd5b8286015b848110156126fd5780356126f0816125d8565b83529183019183016126dd565b509695505050505050565b60008060006060848603121561271d57600080fd5b833567ffffffffffffffff8082111561273557600080fd5b61274187838801612694565b945060209150818601358181111561275857600080fd5b61276488828901612694565b94505060408601358181111561277957600080fd5b86019050601f8101871361278c57600080fd5b803561279a6126b582612670565b81815260059190911b820183019083810190898311156127b957600080fd5b928401925b828410156127e757833580600f0b81146127d85760008081fd5b825292840192908401906127be565b80955050505050509250925092565b60006020828403121561280857600080fd5b8135610a19816125d8565b634e487b7160e01b600052602160045260246000fd5b602081016002831061284b57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561286657600080fd5b8335612871816125d8565b92506020840135612881816125d8565b91506040840135612891816125d8565b809150509250925092565b6000815180845260005b818110156128c2576020818501810151868301820152016128a6565b818111156128d4576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561293e57603f1988860301845261292c85835161289c565b94509285019290850190600101612910565b5092979650505050505050565b6000806000806080858703121561296157600080fd5b843561296c816125d8565b9350602085013561297c816125d8565b9250604085013561298c816125d8565b9396929550929360600135925050565b6000602082840312156129ae57600080fd5b813560028110610a1957600080fd5b6000806000606084860312156129d257600080fd5b83356129dd816125d8565b925060208401356129ed816125d8565b929592945050506040919091013590565b60008060408385031215612a1157600080fd5b8235612a1c816125d8565b946020939093013593505050565b60008060408385031215612a3d57600080fd5b823567ffffffffffffffff80821115612a5557600080fd5b612a6186838701612694565b9350602091508185013581811115612a7857600080fd5b85019050601f81018613612a8b57600080fd5b8035612a996126b582612670565b81815260059190911b82018301908381019088831115612ab857600080fd5b928401925b82841015612ae55783358015158114612ad65760008081fd5b82529284019290840190612abd565b80955050505050509250929050565b600060208284031215612b0657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b4e5783516001600160a01b031683529284019291840191600101612b29565b50909695505050505050565b600060208284031215612b6c57600080fd5b8151610a19816125d8565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b602080825260079082015266042d8cadccee8d60cb1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612c3457612c34612c0a565b5060010190565b600060208284031215612c4d57600080fd5b5051919050565b6000816000190483118215151615612c6e57612c6e612c0a565b500290565b600082612c9057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ca857612ca8612c0a565b500190565b6001600160a01b0383168152604060208201819052600090610a169083018461289c565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b8060005b6002811015611393578151845260209384019390910190600101612d0c565b60608101612d398285612d08565b82151560408301529392505050565b8060005b6003811015611393578151845260209384019390910190600101612d4c565b60808101612d798285612d48565b82151560608301529392505050565b60808101612d968286612d08565b8360408301528215156060830152949350505050565b60a08101612dba8286612d48565b8360608301528215156080830152949350505050565b600060208284031215612de257600080fd5b815160ff81168114610a1957600080fd5b600082821015612e0557612e05612c0a565b500390565b600181815b80851115612e45578160001904821115612e2b57612e2b612c0a565b80851615612e3857918102915b93841c9390800290612e0f565b509250929050565b600082612e5c57506001610996565b81612e6957506000610996565b8160018114612e7f5760028114612e8957612ea5565b6001915050610996565b60ff841115612e9a57612e9a612c0a565b50506001821b610996565b5060208310610133831016604e8410600b8410161715612ec8575081810a610996565b612ed28383612e0a565b8060001904821115612ee657612ee6612c0a565b029392505050565b6000610a198383612e4d56fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/QuickSwapPoolAdapter.json b/deployments/tenderly-polygon@26874895/QuickSwapPoolAdapter.json new file mode 100644 index 000000000..e7c6ec26f --- /dev/null +++ b/deployments/tenderly-polygon@26874895/QuickSwapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factoryRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xaeaa368f83edb67bff381cb09d7b666986ce1620911e06897491eea63ccc6617", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x72aba46f25C4c270d20c575D023627B45E307446", + "transactionIndex": 0, + "gasUsed": "2262287", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x5cba1df3a25fe400a0df36d2b8ac834b995b37b6d223895cd8d2f9fbbfbb06f7", + "transactionHash": "0xaeaa368f83edb67bff381cb09d7b666986ce1620911e06897491eea63ccc6617", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874914, + "transactionHash": "0xaeaa368f83edb67bff381cb09d7b666986ce1620911e06897491eea63ccc6617", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000020a6bf8fdd6d0f100000000000000000000000000000000000000000000000024287d15548ace000000000000000000000000000000000000000000000009c1522cf9d24da525d800000000000000000000000000000000000000000000000024287d15548ace000000000000000000000000000000000000000000000009c1522cf9d24da525d8", + "logIndex": 0, + "blockHash": "0x5cba1df3a25fe400a0df36d2b8ac834b995b37b6d223895cd8d2f9fbbfbb06f7" + } + ], + "blockNumber": 26874914, + "cumulativeGasUsed": "2262287", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027663803806200276683398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b580620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c806385541e44116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b806385541e44146103425780638d87c4eb1461035557806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c578063770788721461031f5780637c47b3f41461032d57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e3735757371414417b8c6caad45baef941abc7d3ab3281565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e3610290366004612232565b61034061033b36600461239a565b610bb4565b005b61022b6103503660046123bb565b610cc4565b6101e373a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b61022b61037e36600461224f565b610e93565b61022b61271081565b61034061039a3660046123fc565b610f01565b6103406103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b6103406103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61034061043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff8885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b0316735757371414417b8c6caad45baef941abc7d3ab326001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd8560056124c7565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107ca611e07846107cd6124c7565b611e38611e1786623cda296124c7565b611e2486623cda206124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e56124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c35760003560e01c806385541e44116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b806385541e44146103425780638d87c4eb1461035557806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c578063770788721461031f5780637c47b3f41461032d57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e3735757371414417b8c6caad45baef941abc7d3ab3281565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e3610290366004612232565b61034061033b36600461239a565b610bb4565b005b61022b6103503660046123bb565b610cc4565b6101e373a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b61022b61037e36600461224f565b610e93565b61022b61271081565b61034061039a3660046123fc565b610f01565b6103406103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b6103406103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61034061043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff8885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b0316735757371414417b8c6caad45baef941abc7d3ab326001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd8560056124c7565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107ca611e07846107cd6124c7565b611e38611e1786623cda296124c7565b611e2486623cda206124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e56124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/Registry.json b/deployments/tenderly-polygon@26874895/Registry.json new file mode 100644 index 000000000..52673e682 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/Registry.json @@ -0,0 +1,2142 @@ +{ + "address": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_riskProfileCodes", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "_names", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "_symbols", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "_canBorrow", + "type": "bool[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange[]", + "name": "_poolRatingRanges", + "type": "tuple[]" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryProxy", + "name": "_registryProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFinanceOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getHarvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "internalType": "struct DataTypes.LiquidityPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getODEFIVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOPTYDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "getRiskProfile", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "poolRatingsRange", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct DataTypes.RiskProfile", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskProfileList", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenHashes", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getTokensHashByIndex", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashIndexByHash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashToTokenList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "isApprovedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "removeRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_harvestCodeProvider", + "type": "address" + } + ], + "name": "setHarvestCodeProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_odefiVaultBooster", + "type": "address" + } + ], + "name": "setODEFIVaultBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_opty", + "type": "address" + } + ], + "name": "setOPTY", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskManager", + "type": "address" + } + ], + "name": "setRiskManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyProvider", + "type": "address" + } + ], + "name": "setStrategyProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "updateRPPoolRatings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + } + ], + "name": "updateRiskProfileBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x10812ae4c6e5ee2e0b996c7c8c9c91e0296e1b012599dd7947748d0c0963b9fd", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "transactionIndex": 0, + "gasUsed": "3504759", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x9caad41f381f68f3c304f118c8c5ff695ada6f20c49861ca0694750ef35d29c1", + "transactionHash": "0x10812ae4c6e5ee2e0b996c7c8c9c91e0296e1b012599dd7947748d0c0963b9fd", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874898, + "transactionHash": "0x10812ae4c6e5ee2e0b996c7c8c9c91e0296e1b012599dd7947748d0c0963b9fd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000329576218fbeb8900000000000000000000000000000000000000000000000033384cdc9a9392000000000000000000000000000000000000000000000009c1431d2a0b089b291200000000000000000000000000000000000000000000000033384cdc9a9392000000000000000000000000000000000000000000000009c1431d2a0b089b2912", + "logIndex": 0, + "blockHash": "0x9caad41f381f68f3c304f118c8c5ff695ada6f20c49861ca0694750ef35d29c1" + } + ], + "blockNumber": 26874898, + "cumulativeGasUsed": "3504759", + "status": 1, + "byzantium": true + }, + "args": [], + "bytecode": "0x608060405234801561001057600080fd5b50613e67806100206000396000f3fe608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/RegistryProxy.json b/deployments/tenderly-polygon@26874895/RegistryProxy.json new file mode 100644 index 000000000..dc9c4ea67 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/RegistryProxy.json @@ -0,0 +1,1338 @@ +{ + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newGovernance", + "type": "address" + } + ], + "name": "NewGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "NewPendingGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptGovernance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "setPendingGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "transactionIndex": 0, + "gasUsed": "1252404", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000001000001000000000010000108000000000000000000000000000004000000000000000000000000000800000000000000008000100000110000000000000020000000000000000000800040000000000000080000000000000000000000000000000000000000000020000000000000080000000000000000000200000000008000000000000000000000040000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000840000000000002000000000000000000000000000000000000002000100000", + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a", + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874897, + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a" + }, + { + "transactionIndex": 0, + "blockNumber": 26874897, + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a" + }, + { + "transactionIndex": 0, + "blockNumber": 26874897, + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f15225380", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a" + }, + { + "transactionIndex": 0, + "blockNumber": 26874897, + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "address": "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "topics": [ + "0xa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac076", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a" + }, + { + "transactionIndex": 0, + "blockNumber": 26874897, + "transactionHash": "0x0a9de17240a2cd8b9602a20ca0ca6999d6fcc1f76c1c52ef34f7828672c2d093", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x0000000000000000000000000000000000000000000000000121368fe9b7ebcc0000000000000000000000000000000000000000000000003661a43eb3c4f8000000000000000000000000000000000000000000000009c13ff3d2a8ef9f3d890000000000000000000000000000000000000000000000003661a43eb3c4f8000000000000000000000000000000000000000000000009c13ff3d2a8ef9f3d89", + "logIndex": 0, + "blockHash": "0x2774c9d9bc745e6889a62fdae1cff1defbcc5f652e479d02c6fa3556a439b24a" + } + ], + "blockNumber": 26874897, + "cumulativeGasUsed": "1252404", + "status": 1, + "byzantium": true + }, + "args": [], + "bytecode": "0x60806040523480156200001157600080fd5b50600080546001600160a01b03191633908117909155620000329062000059565b6200003d3362000145565b620000483362000231565b62000053336200031d565b62000409565b6000546001600160a01b03163314620000a8576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620000f2576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b6000546001600160a01b0316331462000194576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620001de576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331462000280576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620002ca576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6000546001600160a01b031633146200036c576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620003b6576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b61134480620004196000396000f3fe6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500", + "deployedBytecode": "0x6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/RiskManager.json b/deployments/tenderly-polygon@26874895/RiskManager.json new file mode 100644 index 000000000..3c24bd6bd --- /dev/null +++ b/deployments/tenderly-polygon@26874895/RiskManager.json @@ -0,0 +1,188 @@ +{ + "address": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "contract RiskManagerProxy", + "name": "_riskManagerProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5fceff3825c613156713eb244e72fbcb7b0e9c1a3d69d5b8c6c65936bfdda1d6", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "transactionIndex": 0, + "gasUsed": "1043442", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0xc2f8849d22af1f489280a0e61cd9684a8571146efdb759e6e06b365daff4b070", + "transactionHash": "0x5fceff3825c613156713eb244e72fbcb7b0e9c1a3d69d5b8c6c65936bfdda1d6", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874903, + "transactionHash": "0x5fceff3825c613156713eb244e72fbcb7b0e9c1a3d69d5b8c6c65936bfdda1d6", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000f0f552b5ee080e00000000000000000000000000000000000000000000000031a99dee20c30a000000000000000000000000000000000000000000000009c144abd8f98251591e00000000000000000000000000000000000000000000000031a99dee20c30a000000000000000000000000000000000000000000000009c144abd8f98251591e", + "logIndex": 0, + "blockHash": "0xc2f8849d22af1f489280a0e61cd9684a8571146efdb759e6e06b365daff4b070" + } + ], + "blockNumber": 26874903, + "cumulativeGasUsed": "1043442", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b5060405161120a38038061120a83398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b611179806100916000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/RiskManagerProxy.json b/deployments/tenderly-polygon@26874895/RiskManagerProxy.json new file mode 100644 index 000000000..bb1b63ddd --- /dev/null +++ b/deployments/tenderly-polygon@26874895/RiskManagerProxy.json @@ -0,0 +1,175 @@ +{ + "address": "0x46F0FD86744AbF60D4beA64564EED55970e3a459", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x255f8390d1427152552e741110d704b02f608cc7018b3800c5c4994bd5039ff0", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x46F0FD86744AbF60D4beA64564EED55970e3a459", + "transactionIndex": 0, + "gasUsed": "398206", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x98d9402f654812552b55a363a5f0a1d02eb3580417013906dcb10a1538890e01", + "transactionHash": "0x255f8390d1427152552e741110d704b02f608cc7018b3800c5c4994bd5039ff0", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874902, + "transactionHash": "0x255f8390d1427152552e741110d704b02f608cc7018b3800c5c4994bd5039ff0", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000005bf4ce5a825882000000000000000000000000000000000000000000000000329a9340d6c0fe000000000000000000000000000000000000000000000009c143bae3a6cc635110000000000000000000000000000000000000000000000000329a9340d6c0fe000000000000000000000000000000000000000000000009c143bae3a6cc635110", + "logIndex": 0, + "blockHash": "0x98d9402f654812552b55a363a5f0a1d02eb3580417013906dcb10a1538890e01" + } + ], + "blockNumber": 26874902, + "cumulativeGasUsed": "398206", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b506040516106333803806106338339818101604052602081101561003357600080fd5b5051600280546001600160a01b0319166001600160a01b039092169190911790556105d0806100636000396000f3fe6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a", + "deployedBytecode": "0x6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/StrategyProvider.json b/deployments/tenderly-polygon@26874895/StrategyProvider.json new file mode 100644 index 000000000..4c021ad66 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/StrategyProvider.json @@ -0,0 +1,420 @@ +{ + "address": "0xc3Ae5186FcCb1971eAb1579A9E49988CEadF0936", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToDefaultStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToBestStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToDefaultStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestDefaultStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "_vaultRewardStrategy", + "type": "tuple" + } + ], + "name": "setVaultRewardStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "vaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0be025dbc6b04a3a1d243a49f071ebb8ca1a5511a44277318f7ee0c6c78da8cb", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xc3Ae5186FcCb1971eAb1579A9E49988CEadF0936", + "transactionIndex": 0, + "gasUsed": "797383", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0xa1b48ac8d7f4a35cb360ac6c685ffc66d39104b17eaa155cdde4092871708b6f", + "transactionHash": "0x0be025dbc6b04a3a1d243a49f071ebb8ca1a5511a44277318f7ee0c6c78da8cb", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874907, + "transactionHash": "0x0be025dbc6b04a3a1d243a49f071ebb8ca1a5511a44277318f7ee0c6c78da8cb", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000b82303d02c5b3900000000000000000000000000000000000000000000000030c856e5ffb196000000000000000000000000000000000000000000000009c1458d2001a353ea6c00000000000000000000000000000000000000000000000030c856e5ffb196000000000000000000000000000000000000000000000009c1458d2001a353ea6c", + "logIndex": 0, + "blockHash": "0xa1b48ac8d7f4a35cb360ac6c685ffc66d39104b17eaa155cdde4092871708b6f" + } + ], + "blockNumber": 26874907, + "cumulativeGasUsed": "797383", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x608060405234801561001057600080fd5b50604051610d96380380610d9683398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610d05806100916000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/SushiswapPoolAdapter.json b/deployments/tenderly-polygon@26874895/SushiswapPoolAdapter.json new file mode 100644 index 000000000..986dc698d --- /dev/null +++ b/deployments/tenderly-polygon@26874895/SushiswapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sushiswapFactory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sushiswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x05cefc547dec2721696907e1eaad68f31310003fd61f69c47b10c10e3ae62828", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "transactionIndex": 0, + "gasUsed": "2262515", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x176717f14bb75db187c482861446345e15ae4c8d71128a0bf2c89f0ecdae0f65", + "transactionHash": "0x05cefc547dec2721696907e1eaad68f31310003fd61f69c47b10c10e3ae62828", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874913, + "transactionHash": "0x05cefc547dec2721696907e1eaad68f31310003fd61f69c47b10c10e3ae62828", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000020a79738aacb80d0000000000000000000000000000000000000000000000002632e90e528424000000000000000000000000000000000000000000000009c150228dd94fce54e70000000000000000000000000000000000000000000000002632e90e528424000000000000000000000000000000000000000000000009c150228dd94fce54e7", + "logIndex": 0, + "blockHash": "0x176717f14bb75db187c482861446345e15ae4c8d71128a0bf2c89f0ecdae0f65" + } + ], + "blockNumber": 26874913, + "cumulativeGasUsed": "2262515", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027673803806200276783398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b680620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806385541e44116100f9578063df93572211610097578063ee665bed11610071578063ee665bed146103ff578063ef856be914610412578063f1aacbb714610432578063f49307ca1461044557600080fd5b8063df935722146103be578063e49d5ecc146103d1578063e9240c2d146103e457600080fd5b8063919b69d7116100d3578063919b69d714610372578063a91ee0dc14610385578063d74baaf814610398578063da699f96146103ab57600080fd5b806385541e441461034357806390e6160514610356578063918f86741461036957600080fd5b80634ad36e0211610166578063609257791161014057806360925779146102fa57806364dd5f801461030d57806377078872146103205780637c47b3f41461032e57600080fd5b80634ad36e02146102ac5780634f83b52d146102bf578063501070be146102df57600080fd5b80632af06b96116101a25780632af06b961461023b5780632de778381461025557806336d8bf9314610268578063489b52951461028c57600080fd5b8063027a304d146101c9578063191c194b1461020757806328c1f99b14610210575b600080fd5b6101f46101d73660046121bc565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6101f460035481565b600054610223906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b6004546102489060ff1681565b6040516101fe919061220b565b6101f46102633660046121bc565b610458565b61027c610276366004612233565b50600090565b60405190151581526020016101fe565b61029f61029a366004612250565b6104d8565b6040516101fe91906122e8565b6101f46102ba36600461234a565b61055f565b6101f46102cd366004612233565b60026020526000908152604090205481565b61022373c35dadb65012ec5796536bd9864ed8773abc74c481565b61029f61030836600461234a565b6105ab565b6101f461031b366004612250565b610ba3565b610223610276366004612233565b61034161033c36600461239b565b610bb5565b005b6101f46103513660046123bc565b610cc5565b6101f4610364366004612250565b610e94565b6101f461271081565b6103416103803660046123fd565b610f02565b610341610393366004612233565b610ff0565b6102236103a63660046121bc565b919050565b6103416103b9366004612429565b61112c565b61029f6103cc36600461234a565b611206565b61027c6103df36600461234a565b611810565b610223731b02da8cb0d097eb8d57a175b88c7d8b4799750681565b6101f461040d3660046123bc565b61182b565b6104256104203660046121bc565b6119a1565b6040516101fe9190612486565b6103416104403660046123bc565b611af1565b61029f610453366004612250565b611bef565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612499565b6104d19060026124c8565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105489190612499565b905061055685858584611206565b95945050505050565b60008061056d868686610e94565b9050600061057c878787610ba3565b90508061058985846124c8565b61059391906124e7565b61059e906001612509565b925050505b949350505050565b606081156105a35760408051600680825260e0820190925290816020015b60608152602001906001900390816105c957905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064393929101612521565b6040516020818303038152906040528160008151811061066557610665612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d293929101612521565b604051602081830303815290604052816001815181106106f4576106f4612545565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610763919061255b565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ca919061258f565b506001600160701b031691506001600160701b0316915060006107ee878484611c0c565b9050806107fb87856124c8565b61080591906124e7565b92508061081287846124c8565b61081c91906124e7565b9150876001600160a01b0316846001600160a01b031614156108a057866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089a919061255b565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e4820152731b02da8cb0d097eb8d57a175b88c7d8b47997506906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093293929101612521565b6040516020818303038152906040528560028151811061095457610954612545565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b693929101612521565b604051602081830303815290604052856003815181106109d8576109d8612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4593929101612521565b60405160208183030381529060405285600481518110610a6757610a67612545565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aab57610aab612545565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610adf57610adf612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838d600019604051602401610b309594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6993929101612521565b60405160208183030381529060405286600581518110610b8b57610b8b612545565b60200260200101819052505050505050949350505050565b60006105a3838361040d878787610e94565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2a919061255b565b6001600160a01b0316336001600160a01b031614610c635760405162461bcd60e51b8152600401610c5a90612613565b60405180910390fd5b6004805482919060ff191660018381811115610c8157610c816121f5565b021790555033816001811115610c9957610c996121f5565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061258f565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf919061255b565b6001600160a01b031614610dbf57905b6000610dcb8386611df7565b90506000610dda828585611e4d565b9050610de68285612509565b9350610df2818461264a565b92506000610e01888686611c0c565b90506000610e0f848961264a565b90506000610e1e828888611f2c565b905083811115610e38575082610e35818789611f2c565b91505b600087610e4585856124c8565b610e4f91906124e7565b905086610e5c85846124c8565b610e6691906124e7565b811115610e855786610e7885846124c8565b610e8291906124e7565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a39190612499565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f77919061255b565b6001600160a01b0316336001600160a01b031614610fa75760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611065919061255b565b6001600160a01b0316336001600160a01b0316146110c55760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c5a565b6001600160a01b0381163b61110a5760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c5a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a1919061255b565b6001600160a01b0316336001600160a01b0316146111d15760405162461bcd60e51b8152600401610c5a90612613565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611213848484611fcc565b915081156105a35760408051600680825260e0820190925290816020015b606081526020019060019003908161123157905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112ab93929101612521565b604051602081830303815290604052816000815181106112cd576112cd612545565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061258f565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb919061255b565b9450886001600160a01b0316856001600160a01b031614156114465760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611443919061255b565b94505b6114508288611df7565b935061145d848383611e4d565b604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c593929101612521565b604051602081830303815290604052846001815181106114e7576114e7612545565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152b5761152b612545565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155f5761155f612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838c6000196040516024016115b09594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e993929101612521565b6040516020818303038152906040528560028151811061160b5761160b612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167893929101612521565b6040516020818303038152906040528560038151811061169a5761169a612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170793929101612521565b6040516020818303038152906040528560048151811061172957611729612545565b6020908102919091010152731b02da8cb0d097eb8d57a175b88c7d8b479975068885611755868a61264a565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d793929101612521565b604051602081830303815290604052856005815181106117f9576117f9612545565b602002602001018190525050505050949350505050565b60008061181e868686610ba3565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611892919061258f565b506001600160701b031691506001600160701b0316915060006118b6868484611c0c565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611900573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611924919061255b565b6001600160a01b031614611936579091905b60008161194387866124c8565b61194d91906124e7565b905060008261195c88866124c8565b61196691906124e7565b9050600061198782611978818861264a565b611982868a61264a565b611e4d565b90506119938184612509565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a23919061255b565b81600081518110611a3657611a36612545565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab8919061255b565b81600181518110611acb57611acb612545565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b66919061255b565b6001600160a01b0316336001600160a01b031614611b965760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfe858585610e94565b9050610556858585846105ab565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c709190612499565b905060006001600160a01b031673c35dadb65012ec5796536bd9864ed8773abc74c46001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf3919061255b565b6001600160a01b0316146104d1576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190612499565b90508015611def576000611d81611d7c85876124c8565b612135565b90506000611d8e83612135565b905080821115611dec576000611da4828461264a565b611dae90866124c8565b9050600082611dbe8560056124c8565b611dc89190612509565b90506000611dd682846124e7565b90508015611de8576119938188612509565b5050505b50505b509392505050565b60006107ca611e08846107cd6124c8565b611e39611e1886623cda296124c8565b611e2586623cda206124c8565b611e2f9190612509565b611d7c90876124c8565b611e43919061264a565b6104d191906124e7565b6000808411611eb25760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c5a565b600083118015611ec25750600082115b611ede5760405162461bcd60e51b8152600401610c5a90612661565b6000611eec856103e56124c8565b90506000611efa84836124c8565b9050600082611f0b876103e86124c8565b611f159190612509565b9050611f2181836124e7565b979650505050505050565b6000808411611f8b5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c5a565b600083118015611f9b5750600082115b611fb75760405162461bcd60e51b8152600401610c5a90612661565b82611fc283866124c8565b6105a391906124e7565b60008060045460ff166001811115611fe657611fe66121f5565b141561204c576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204557506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d1565b50806104d1565b60006120588486610458565b6001600160a01b038516600090815260026020526040902054909150156120f1576001600160a01b038416600090815260026020526040902054612710906120a090836124c8565b6120aa91906124e7565b8311156120e9576001600160a01b038416600090815260026020526040902054612710906120d890836124c8565b6120e291906124e7565b9150611def565b829150611def565b60035415611def576127106003548261210a91906124c8565b61211491906124e7565b83111561212c57612710600354826120d891906124c8565b50909392505050565b60006003821115612196575080600061214f6002836124e7565b61215a906001612509565b90505b818110156121905790508060028161217581866124e7565b61217f9190612509565b61218991906124e7565b905061215d565b50919050565b81156103a657506001919050565b6001600160a01b03811681146121b957600080fd5b50565b600080604083850312156121cf57600080fd5b82356121da816121a4565b915060208301356121ea816121a4565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224557600080fd5b81356104d1816121a4565b60008060006060848603121561226557600080fd5b8335612270816121a4565b92506020840135612280816121a4565b91506040840135612290816121a4565b809150509250925092565b6000815180845260005b818110156122c1576020818501810151868301820152016122a5565b818111156122d3576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233d57603f1988860301845261232b85835161229b565b9450928501929085019060010161230f565b5092979650505050505050565b6000806000806080858703121561236057600080fd5b843561236b816121a4565b9350602085013561237b816121a4565b9250604085013561238b816121a4565b9396929550929360600135925050565b6000602082840312156123ad57600080fd5b8135600281106104d157600080fd5b6000806000606084860312156123d157600080fd5b83356123dc816121a4565b925060208401356123ec816121a4565b929592945050506040919091013590565b6000806040838503121561241057600080fd5b823561241b816121a4565b946020939093013593505050565b60006020828403121561243b57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247b5781516001600160a01b031687529582019590820190600101612456565b509495945050505050565b6020815260006104d16020830184612442565b6000602082840312156124ab57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e2576124e26124b2565b500290565b60008261250457634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251c5761251c6124b2565b500190565b6001600160a01b03831681526040602082018190526000906105a39083018461229b565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256d57600080fd5b81516104d1816121a4565b80516001600160701b03811681146103a657600080fd5b6000806000606084860312156125a457600080fd5b6125ad84612578565b92506125bb60208501612578565b9150604084015163ffffffff8116811461229057600080fd5b85815260ff8516602082015260a0604082015260006125f660a0830186612442565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265c5761265c6124b2565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806385541e44116100f9578063df93572211610097578063ee665bed11610071578063ee665bed146103ff578063ef856be914610412578063f1aacbb714610432578063f49307ca1461044557600080fd5b8063df935722146103be578063e49d5ecc146103d1578063e9240c2d146103e457600080fd5b8063919b69d7116100d3578063919b69d714610372578063a91ee0dc14610385578063d74baaf814610398578063da699f96146103ab57600080fd5b806385541e441461034357806390e6160514610356578063918f86741461036957600080fd5b80634ad36e0211610166578063609257791161014057806360925779146102fa57806364dd5f801461030d57806377078872146103205780637c47b3f41461032e57600080fd5b80634ad36e02146102ac5780634f83b52d146102bf578063501070be146102df57600080fd5b80632af06b96116101a25780632af06b961461023b5780632de778381461025557806336d8bf9314610268578063489b52951461028c57600080fd5b8063027a304d146101c9578063191c194b1461020757806328c1f99b14610210575b600080fd5b6101f46101d73660046121bc565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6101f460035481565b600054610223906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b6004546102489060ff1681565b6040516101fe919061220b565b6101f46102633660046121bc565b610458565b61027c610276366004612233565b50600090565b60405190151581526020016101fe565b61029f61029a366004612250565b6104d8565b6040516101fe91906122e8565b6101f46102ba36600461234a565b61055f565b6101f46102cd366004612233565b60026020526000908152604090205481565b61022373c35dadb65012ec5796536bd9864ed8773abc74c481565b61029f61030836600461234a565b6105ab565b6101f461031b366004612250565b610ba3565b610223610276366004612233565b61034161033c36600461239b565b610bb5565b005b6101f46103513660046123bc565b610cc5565b6101f4610364366004612250565b610e94565b6101f461271081565b6103416103803660046123fd565b610f02565b610341610393366004612233565b610ff0565b6102236103a63660046121bc565b919050565b6103416103b9366004612429565b61112c565b61029f6103cc36600461234a565b611206565b61027c6103df36600461234a565b611810565b610223731b02da8cb0d097eb8d57a175b88c7d8b4799750681565b6101f461040d3660046123bc565b61182b565b6104256104203660046121bc565b6119a1565b6040516101fe9190612486565b6103416104403660046123bc565b611af1565b61029f610453366004612250565b611bef565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612499565b6104d19060026124c8565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105489190612499565b905061055685858584611206565b95945050505050565b60008061056d868686610e94565b9050600061057c878787610ba3565b90508061058985846124c8565b61059391906124e7565b61059e906001612509565b925050505b949350505050565b606081156105a35760408051600680825260e0820190925290816020015b60608152602001906001900390816105c957905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064393929101612521565b6040516020818303038152906040528160008151811061066557610665612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d293929101612521565b604051602081830303815290604052816001815181106106f4576106f4612545565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610763919061255b565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ca919061258f565b506001600160701b031691506001600160701b0316915060006107ee878484611c0c565b9050806107fb87856124c8565b61080591906124e7565b92508061081287846124c8565b61081c91906124e7565b9150876001600160a01b0316846001600160a01b031614156108a057866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089a919061255b565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e4820152731b02da8cb0d097eb8d57a175b88c7d8b47997506906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093293929101612521565b6040516020818303038152906040528560028151811061095457610954612545565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b693929101612521565b604051602081830303815290604052856003815181106109d8576109d8612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4593929101612521565b60405160208183030381529060405285600481518110610a6757610a67612545565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aab57610aab612545565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610adf57610adf612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838d600019604051602401610b309594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6993929101612521565b60405160208183030381529060405286600581518110610b8b57610b8b612545565b60200260200101819052505050505050949350505050565b60006105a3838361040d878787610e94565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2a919061255b565b6001600160a01b0316336001600160a01b031614610c635760405162461bcd60e51b8152600401610c5a90612613565b60405180910390fd5b6004805482919060ff191660018381811115610c8157610c816121f5565b021790555033816001811115610c9957610c996121f5565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061258f565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf919061255b565b6001600160a01b031614610dbf57905b6000610dcb8386611df7565b90506000610dda828585611e4d565b9050610de68285612509565b9350610df2818461264a565b92506000610e01888686611c0c565b90506000610e0f848961264a565b90506000610e1e828888611f2c565b905083811115610e38575082610e35818789611f2c565b91505b600087610e4585856124c8565b610e4f91906124e7565b905086610e5c85846124c8565b610e6691906124e7565b811115610e855786610e7885846124c8565b610e8291906124e7565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a39190612499565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f77919061255b565b6001600160a01b0316336001600160a01b031614610fa75760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611065919061255b565b6001600160a01b0316336001600160a01b0316146110c55760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c5a565b6001600160a01b0381163b61110a5760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c5a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a1919061255b565b6001600160a01b0316336001600160a01b0316146111d15760405162461bcd60e51b8152600401610c5a90612613565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611213848484611fcc565b915081156105a35760408051600680825260e0820190925290816020015b606081526020019060019003908161123157905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112ab93929101612521565b604051602081830303815290604052816000815181106112cd576112cd612545565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061258f565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb919061255b565b9450886001600160a01b0316856001600160a01b031614156114465760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611443919061255b565b94505b6114508288611df7565b935061145d848383611e4d565b604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c593929101612521565b604051602081830303815290604052846001815181106114e7576114e7612545565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152b5761152b612545565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155f5761155f612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838c6000196040516024016115b09594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e993929101612521565b6040516020818303038152906040528560028151811061160b5761160b612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167893929101612521565b6040516020818303038152906040528560038151811061169a5761169a612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170793929101612521565b6040516020818303038152906040528560048151811061172957611729612545565b6020908102919091010152731b02da8cb0d097eb8d57a175b88c7d8b479975068885611755868a61264a565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d793929101612521565b604051602081830303815290604052856005815181106117f9576117f9612545565b602002602001018190525050505050949350505050565b60008061181e868686610ba3565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611892919061258f565b506001600160701b031691506001600160701b0316915060006118b6868484611c0c565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611900573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611924919061255b565b6001600160a01b031614611936579091905b60008161194387866124c8565b61194d91906124e7565b905060008261195c88866124c8565b61196691906124e7565b9050600061198782611978818861264a565b611982868a61264a565b611e4d565b90506119938184612509565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a23919061255b565b81600081518110611a3657611a36612545565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab8919061255b565b81600181518110611acb57611acb612545565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b66919061255b565b6001600160a01b0316336001600160a01b031614611b965760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfe858585610e94565b9050610556858585846105ab565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c709190612499565b905060006001600160a01b031673c35dadb65012ec5796536bd9864ed8773abc74c46001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf3919061255b565b6001600160a01b0316146104d1576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190612499565b90508015611def576000611d81611d7c85876124c8565b612135565b90506000611d8e83612135565b905080821115611dec576000611da4828461264a565b611dae90866124c8565b9050600082611dbe8560056124c8565b611dc89190612509565b90506000611dd682846124e7565b90508015611de8576119938188612509565b5050505b50505b509392505050565b60006107ca611e08846107cd6124c8565b611e39611e1886623cda296124c8565b611e2586623cda206124c8565b611e2f9190612509565b611d7c90876124c8565b611e43919061264a565b6104d191906124e7565b6000808411611eb25760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c5a565b600083118015611ec25750600082115b611ede5760405162461bcd60e51b8152600401610c5a90612661565b6000611eec856103e56124c8565b90506000611efa84836124c8565b9050600082611f0b876103e86124c8565b611f159190612509565b9050611f2181836124e7565b979650505050505050565b6000808411611f8b5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c5a565b600083118015611f9b5750600082115b611fb75760405162461bcd60e51b8152600401610c5a90612661565b82611fc283866124c8565b6105a391906124e7565b60008060045460ff166001811115611fe657611fe66121f5565b141561204c576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204557506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d1565b50806104d1565b60006120588486610458565b6001600160a01b038516600090815260026020526040902054909150156120f1576001600160a01b038416600090815260026020526040902054612710906120a090836124c8565b6120aa91906124e7565b8311156120e9576001600160a01b038416600090815260026020526040902054612710906120d890836124c8565b6120e291906124e7565b9150611def565b829150611def565b60035415611def576127106003548261210a91906124c8565b61211491906124e7565b83111561212c57612710600354826120d891906124c8565b50909392505050565b60006003821115612196575080600061214f6002836124e7565b61215a906001612509565b90505b818110156121905790508060028161217581866124e7565b61217f9190612509565b61218991906124e7565b905061215d565b50919050565b81156103a657506001919050565b6001600160a01b03811681146121b957600080fd5b50565b600080604083850312156121cf57600080fd5b82356121da816121a4565b915060208301356121ea816121a4565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224557600080fd5b81356104d1816121a4565b60008060006060848603121561226557600080fd5b8335612270816121a4565b92506020840135612280816121a4565b91506040840135612290816121a4565b809150509250925092565b6000815180845260005b818110156122c1576020818501810151868301820152016122a5565b818111156122d3576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233d57603f1988860301845261232b85835161229b565b9450928501929085019060010161230f565b5092979650505050505050565b6000806000806080858703121561236057600080fd5b843561236b816121a4565b9350602085013561237b816121a4565b9250604085013561238b816121a4565b9396929550929360600135925050565b6000602082840312156123ad57600080fd5b8135600281106104d157600080fd5b6000806000606084860312156123d157600080fd5b83356123dc816121a4565b925060208401356123ec816121a4565b929592945050506040919091013590565b6000806040838503121561241057600080fd5b823561241b816121a4565b946020939093013593505050565b60006020828403121561243b57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247b5781516001600160a01b031687529582019590820190600101612456565b509495945050505050565b6020815260006104d16020830184612442565b6000602082840312156124ab57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e2576124e26124b2565b500290565b60008261250457634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251c5761251c6124b2565b500190565b6001600160a01b03831681526040602082018190526000906105a39083018461229b565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256d57600080fd5b81516104d1816121a4565b80516001600160701b03811681146103a657600080fd5b6000806000606084860312156125a457600080fd5b6125ad84612578565b92506125bb60208501612578565b9150604084015163ffffffff8116811461229057600080fd5b85815260ff8516602082015260a0604082015260006125f660a0830186612442565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265c5761265c6124b2565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/tenderly-polygon@26874895/opUSDCgrow.json b/deployments/tenderly-polygon@26874895/opUSDCgrow.json new file mode 100644 index 000000000..0dad278f4 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/opUSDCgrow.json @@ -0,0 +1,1492 @@ +{ + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + }, + { + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "transactionIndex": 0, + "gasUsed": "830308", + "logsBloom": "0x00000000000008000000000000000000000020000000000400800000000000000000000000000000001400000000000000008000000000000000000000000000000000000000000000000000000000800001000000000000000100000000000008000000020000000000000000000800000000000000000080000000000000400000000000000000000010000000000000000020000000000000000000000000200000000000000000000000000200000000000000000000000000000000204000000000000000000001000000000000000000000000000000110000000020000000000000000001000400000000000010000000000000000000002000100000", + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24", + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000b53a61417f0d072e8569aae41b8143cb11c46bd3" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + }, + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + }, + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000bfbd727e923c9c0000000000000000000000000000000000000000000000001b444ca411f512000000000000000000000000000000000000000000000009c15b112a438fa47ad20000000000000000000000000000000000000000000000001b444ca411f512000000000000000000000000000000000000000000000009c15b112a438fa47ad2", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + } + ], + "blockNumber": 26874920, + "cumulativeGasUsed": "830308", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb53a61417f0d072e8569aaE41B8143cb11C46Bd3", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee599600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "execute": { + "methodName": "initialize", + "args": [ + "0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", + "0xc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee5996", + "USDC Coin (PoS)", + "USDC", + "1" + ] + }, + "implementation": "0xb53a61417f0d072e8569aaE41B8143cb11C46Bd3", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/tenderly-polygon@26874895/opUSDCgrow_Implementation.json b/deployments/tenderly-polygon@26874895/opUSDCgrow_Implementation.json new file mode 100644 index 000000000..b5da240c8 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/opUSDCgrow_Implementation.json @@ -0,0 +1,1320 @@ +{ + "address": "0xb53a61417f0d072e8569aaE41B8143cb11C46Bd3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileName", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileSymbol", + "type": "string" + } + ], + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbbb1d932cf77d44cc3b52cd7025d8ecd739aa1348787ac58baece35949332b76", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xb53a61417f0d072e8569aaE41B8143cb11C46Bd3", + "transactionIndex": 0, + "gasUsed": "5460356", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x391d941a0c94f87084f0ca5afb7bc96c81ef1c6fa31b606a252de0223fa3cb10", + "transactionHash": "0xbbb1d932cf77d44cc3b52cd7025d8ecd739aa1348787ac58baece35949332b76", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874919, + "transactionHash": "0xbbb1d932cf77d44cc3b52cd7025d8ecd739aa1348787ac58baece35949332b76", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000004ecf0b721f0d67c0000000000000000000000000000000000000000000000001c040a169093fa000000000000000000000000000000000000000000000009c15a516cd111123e360000000000000000000000000000000000000000000000001c040a169093fa000000000000000000000000000000000000000000000009c15a516cd111123e36", + "logIndex": 0, + "blockHash": "0x391d941a0c94f87084f0ca5afb7bc96c81ef1c6fa31b606a252de0223fa3cb10" + } + ], + "blockNumber": 26874919, + "cumulativeGasUsed": "5460356", + "status": 1, + "byzantium": true + }, + "args": ["0x32bD1a6FdaeC327B57cdB2CFDe0855AfB3255d7C", "USD Coin (PoS)", "USDC", "Growth", "grow"], + "bytecode": "0x6080604052600080553480156200001557600080fd5b50604051620063823803806200638283398101604081905262000038916200020f565b8484836040516020016200004e92919062000327565b604051602081830303815290604052848360405160200162000072929190620002e3565b60408051601f19818403018152919052815162000097906037906020850190620000f2565b508051620000ad906038906020840190620000f2565b5050603980546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550506001603a5550620003a992505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013557805160ff191683800117855562000165565b8280016001018555821562000165579182015b828111156200016557825182559160200191906001019062000148565b506200017392915062000177565b5090565b5b8082111562000173576000815560010162000178565b600082601f8301126200019f578081fd5b81516001600160401b0380821115620001b6578283fd5b604051601f8301601f191681016020018281118282101715620001d7578485fd5b604052828152925082848301602001861015620001f357600080fd5b6200020683602083016020880162000376565b50505092915050565b600080600080600060a0868803121562000227578081fd5b85516001600160a01b03811681146200023e578182fd5b60208701519095506001600160401b03808211156200025b578283fd5b6200026989838a016200018e565b955060408801519150808211156200027f578283fd5b6200028d89838a016200018e565b94506060880151915080821115620002a3578283fd5b620002b189838a016200018e565b93506080880151915080821115620002c7578283fd5b50620002d6888289016200018e565b9150509295509295909350565b60006106f760f41b825283516200030281600285016020880162000376565b8351908301906200031b81600284016020880162000376565b01600201949350505050565b600062037b8160ed1b825283516200034781600385016020880162000376565b600160fd1b60039184019182015283516200036a81600484016020880162000376565b01600401949350505050565b60005b838110156200039357818101518382015260200162000379565b83811115620003a3576000848401525b50505050565b615fc980620003b96000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a" +} diff --git a/deployments/tenderly-polygon@26874895/opUSDCgrow_Proxy.json b/deployments/tenderly-polygon@26874895/opUSDCgrow_Proxy.json new file mode 100644 index 000000000..c5a943bd8 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/opUSDCgrow_Proxy.json @@ -0,0 +1,232 @@ +{ + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + } + ], + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "transactionIndex": 0, + "gasUsed": "830308", + "logsBloom": "0x00000000000008000000000000000000000020000000000400800000000000000000000000000000001400000000000000008000000000000000000000000000000000000000000000000000000000800001000000000000000100000000000008000000020000000000000000000800000000000000000080000000000000400000000000000000000010000000000000000020000000000000000000000000200000000000000000000000000200000000000000000000000000000000204000000000000000000001000000000000000000000000000000110000000020000000000000000001000400000000000010000000000000000000002000100000", + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24", + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000b53a61417f0d072e8569aae41b8143cb11c46bd3" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + }, + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + }, + { + "transactionIndex": 0, + "blockNumber": 26874920, + "transactionHash": "0xef69ad06bf7a782576981cc6e6ccca3864a6c25ae8abc6c104c197c522c5cf2c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x00000000000000000000000000000000000000000000000000bfbd727e923c9c0000000000000000000000000000000000000000000000001b444ca411f512000000000000000000000000000000000000000000000009c15b112a438fa47ad20000000000000000000000000000000000000000000000001b444ca411f512000000000000000000000000000000000000000000000009c15b112a438fa47ad2", + "logIndex": 0, + "blockHash": "0xdc9541c78215871e7e66eec7ac1f5844feed29942873749f8e190c52e907af24" + } + ], + "blockNumber": 26874920, + "cumulativeGasUsed": "830308", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb53a61417f0d072e8569aaE41B8143cb11C46Bd3", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee599600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/tenderly-polygon@26874895/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json b/deployments/tenderly-polygon@26874895/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json new file mode 100644 index 000000000..965551510 --- /dev/null +++ b/deployments/tenderly-polygon@26874895/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json @@ -0,0 +1,39 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.7/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setOwner(ownerAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\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 transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.7/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\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) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\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" + }, + "solc_0.7/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/tasks/actions/set-pending-governance.ts b/tasks/actions/set-pending-governance.ts index c3aeed9f6..a05267ed6 100644 --- a/tasks/actions/set-pending-governance.ts +++ b/tasks/actions/set-pending-governance.ts @@ -24,10 +24,8 @@ task(TASKS.ACTION_TASKS.SET_PENDING_GOVERNANCE.NAME, TASKS.ACTION_TASKS.SET_PEND const currentPendingGovernance = await registryProxyInstance.pendingGovernance(); console.log("current pending governance ", currentPendingGovernance); if (getAddress(newPendingGovernance) != getAddress(currentPendingGovernance)) { - const currentPendingGovernanceSigner = await hre.ethers.getSigner(currentPendingGovernance); - const tx = await registryProxyInstance - .connect(currentPendingGovernanceSigner) - .setPendingGovernance(newPendingGovernance); + const operatorSigner = await hre.ethers.getSigner(await registryProxyInstance.operator()); + const tx = await registryProxyInstance.connect(operatorSigner).setPendingGovernance(newPendingGovernance); await tx.wait(1); const actualNewPendingGovernance = await registryProxyInstance.pendingGovernance(); console.log("The new pending governance is ", actualNewPendingGovernance); From f65829014e1f1190fc198b29d4b8dfd64bfb8902 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Fri, 8 Apr 2022 01:09:58 -0400 Subject: [PATCH 51/52] =?UTF-8?q?chore(deploy):=20polygon=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployments/polygon/.chainId | 1 + deployments/polygon/AaveAdapter.json | 901 +++++++ deployments/polygon/ApeSwapPoolAdapter.json | 748 ++++++ deployments/polygon/BeefyFinanceAdapter.json | 1315 ++++++++++ deployments/polygon/CurveGaugeAdapter.json | 925 +++++++ .../polygon/CurveStableSwapAdapter.json | 983 ++++++++ deployments/polygon/QuickSwapPoolAdapter.json | 748 ++++++ deployments/polygon/Registry.json | 2142 +++++++++++++++++ deployments/polygon/RegistryProxy.json | 1342 +++++++++++ deployments/polygon/RiskManager.json | 188 ++ deployments/polygon/RiskManagerProxy.json | 175 ++ deployments/polygon/StrategyProvider.json | 420 ++++ deployments/polygon/SushiswapPoolAdapter.json | 748 ++++++ deployments/polygon/opUSDCgrow.json | 1492 ++++++++++++ .../polygon/opUSDCgrow_Implementation.json | 1320 ++++++++++ deployments/polygon/opUSDCgrow_Proxy.json | 232 ++ .../2db89642daf7ebd20cbbef9f4540b20d.json | 39 + helper-hardhat-config.ts | 2 +- 18 files changed, 13720 insertions(+), 1 deletion(-) create mode 100644 deployments/polygon/.chainId create mode 100644 deployments/polygon/AaveAdapter.json create mode 100644 deployments/polygon/ApeSwapPoolAdapter.json create mode 100644 deployments/polygon/BeefyFinanceAdapter.json create mode 100644 deployments/polygon/CurveGaugeAdapter.json create mode 100644 deployments/polygon/CurveStableSwapAdapter.json create mode 100644 deployments/polygon/QuickSwapPoolAdapter.json create mode 100644 deployments/polygon/Registry.json create mode 100644 deployments/polygon/RegistryProxy.json create mode 100644 deployments/polygon/RiskManager.json create mode 100644 deployments/polygon/RiskManagerProxy.json create mode 100644 deployments/polygon/StrategyProvider.json create mode 100644 deployments/polygon/SushiswapPoolAdapter.json create mode 100644 deployments/polygon/opUSDCgrow.json create mode 100644 deployments/polygon/opUSDCgrow_Implementation.json create mode 100644 deployments/polygon/opUSDCgrow_Proxy.json create mode 100644 deployments/polygon/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json diff --git a/deployments/polygon/.chainId b/deployments/polygon/.chainId new file mode 100644 index 000000000..0973804c4 --- /dev/null +++ b/deployments/polygon/.chainId @@ -0,0 +1 @@ +137 \ No newline at end of file diff --git a/deployments/polygon/AaveAdapter.json b/deployments/polygon/AaveAdapter.json new file mode 100644 index 000000000..e8a5044bd --- /dev/null +++ b/deployments/polygon/AaveAdapter.json @@ -0,0 +1,901 @@ +{ + "address": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "PROTOCOL_DATA_PROVIDER_ID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WMATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_codes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolToken", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "incentivesController", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPoolAddressProviderRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapV2Router02", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd3a39c5f274665b63e0fe5eda5c6241a42ffababb45fcf45d0ce4b23d3f0a02a", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4E4E888d767823c44C3f3F9E879fb843B961FCfE", + "transactionIndex": 18, + "gasUsed": "2021538", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0x17ca879927a64df63ef10790d4035a374e6450f7e68d34a29364baf55ec6fd04", + "transactionHash": "0xd3a39c5f274665b63e0fe5eda5c6241a42ffababb45fcf45d0ce4b23d3f0a02a", + "logs": [ + { + "transactionIndex": 18, + "blockNumber": 26876064, + "transactionHash": "0xd3a39c5f274665b63e0fe5eda5c6241a42ffababb45fcf45d0ce4b23d3f0a02a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x000000000000000000000000000000000000000000000000016718e7ac5d678c0000000000000000000000000000000000000000000000002d25bc59dd8a70000000000000000000000000000000000000000000000005a6647594ce7895359d0000000000000000000000000000000000000000000000002bbea372312d08740000000000000000000000000000000000000000000005a665dcadb624f29d29", + "logIndex": 55, + "blockHash": "0x17ca879927a64df63ef10790d4035a374e6450f7e68d34a29364baf55ec6fd04" + } + ], + "blockNumber": 26876064, + "cumulativeGasUsed": "5387807", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x608060405234801561001057600080fd5b50604051620023663803806200236683398101604081905261003191610064565b600080546127106001556001600160a01b03929092166001600160a81b031990921691909117600160a01b179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b6122c280620000a46000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c80637c47b3f41161011a578063d463fcf6116100ad578063e49d5ecc1161007c578063e49d5ecc146104ba578063ee665bed146103f3578063ef856be9146104cd578063f1aacbb7146104ed578063f49307ca1461050057600080fd5b8063d463fcf61461046e578063d74baaf814610481578063da699f9614610494578063df935722146104a757600080fd5b8063919b69d7116100e9578063919b69d71461041a578063a91ee0dc1461042d578063af1df25514610440578063b3fe7f5a1461045b57600080fd5b80637c47b3f4146103c85780637df50ed8146103dd57806385541e44146103f357806390e616051461040757600080fd5b8063489b52951161019d5780634f83b52d1161016c5780634f83b52d1461035c578063609257791461037c57806364dd5f801461038f5780636d267d7c146103a257806377078872146103b557600080fd5b8063489b5295146103005780634ad36e02146103135780634d41a1e5146103265780634d95cad91461034157600080fd5b806328c1f99b116101d957806328c1f99b1461027d5780632af06b96146102a85780632de77838146102c957806336d8bf93146102dc57600080fd5b8063027a304d1461020b5780630c9d8d5c14610249578063119d610514610269578063191c194b14610274575b600080fd5b610236610219366004611a59565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61025c610257366004611a92565b610513565b6040516102409190611b2a565b610236600160f81b81565b61023660015481565b600054610290906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6000546102bc90600160a01b900460ff1681565b6040516102409190611ba2565b6102366102d7366004611a59565b6105a5565b6102f06102ea366004611bca565b50600090565b6040519015158152602001610240565b61025c61030e366004611a92565b6105b9565b610236610321366004611be7565b610637565b61029073a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b610290730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61023661036a366004611bca565b60036020526000908152604090205481565b61025c61038a366004611be7565b610641565b61023661039d366004611a92565b610830565b61025c6103b0366004611a59565b61083d565b6102906103c3366004611bca565b610917565b6103db6103d6366004611c38565b61098f565b005b61025c6103eb366004611a59565b606092915050565b610236610401366004611c59565b92915050565b610236610415366004611a92565b610ab3565b6103db610428366004611c9a565b610b2c565b6103db61043b366004611bca565b610c1a565b61029073357d51124f59836ded84c8a1730d72b749d8bc2381565b610236610469366004611a92565b610d11565b61025c61047c366004611be7565b610d54565b61029061048f366004611a59565b610d6b565b6103db6104a2366004611cc6565b610df5565b61025c6104b5366004611be7565b610ecf565b6102f06104c8366004611be7565b6110a2565b6104e06104db366004611a59565b6110bd565b6040516102409190611d23565b6103db6104fb366004611c59565b61117a565b61025c61050e366004611a92565b611278565b606060006105216000610917565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d9190611d36565b905061059c8585600084610d54565b95945050505050565b60006105b18383611295565b519392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610605573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106299190611d36565b905061059c85858584610ecf565b805b949350505050565b606081156106395760006106548461136f565b905060006106628686610d6b565b60408051600380825260808201909252919250816020015b606081526020019060019003908161067a579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106e993929101611d65565b6040516020818303038152906040528360008151811061070b5761070b611d89565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161076d93929101611d65565b6040516020818303038152906040528360018151811061078f5761078f611d89565b60209081029190910101526040516001600160a01b0380881660248301526044820186905288166064820152829060840160408051601f19818403018152918152602080830180516001600160e01b0316631a4ca37b60e21b17905290516107f993929101611d65565b6040516020818303038152906040528360028151811061081b5761081b611d89565b60200260200101819052505050949350505050565b6000610639848484610ab3565b6060600061084d84600080610d11565b60408051600180825281830190925291925060609190816020015b606081526020019060019003908161086857905050925073357d51124f59836ded84c8a1730d72b749d8bc238183876040516024016108a993929190611d9f565b60408051601f19818403018152918152602080830180516001600160e01b0316633111e7b360e01b17905290516108e293929101611d65565b6040516020818303038152906040528360008151811061090457610904611d89565b6020026020010181905250505092915050565b600073357d51124f59836ded84c8a1730d72b749d8bc236001600160a01b03166399248ea76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104019190611de2565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190611de2565b6001600160a01b0316336001600160a01b031614610a3d5760405162461bcd60e51b8152600401610a3490611dff565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610a6257610a62611b8c565b02179055506000543390600160a01b900460ff166001811115610a8757610a87611b8c565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000610abf8383610d6b565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a08231906024015b602060405180830381865afa158015610b08573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190611d36565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611de2565b6001600160a01b0316336001600160a01b031614610bd15760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611de2565b6001600160a01b0316336001600160a01b031614610cef5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610a34565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051630cc7d40f60e11b81526001600160a01b038416600482015260009073357d51124f59836ded84c8a1730d72b749d8bc239063198fa81e90602401610aeb565b606061059c85610d646000610917565b86856113b7565b600080610d778361136f565b6040516335ea6a7560e01b81526001600160a01b0386811660048301529192506000918316906335ea6a759060240161018060405180830381865afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190611f3d565b60e0015195945050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6a9190611de2565b6001600160a01b0316336001600160a01b031614610e9a5760405162461bcd60e51b8152600401610a3490611dff565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000610ee8848685610ee3888a6105a5565b61167a565b90508015611099576000610efb8561136f565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610f13579050506040516001600160a01b038316602482015260006044820152909350869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610f8293929101611d65565b60405160208183030381529060405283600081518110610fa457610fa4611d89565b60209081029190910101526040516001600160a01b038216602482015260448101839052869060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161100693929101611d65565b6040516020818303038152906040528360018151811061102857611028611d89565b60209081029190910101526040516001600160a01b038088166024830152604482018490528816606482015260006084820152819060a40160408051601f19818403018152918152602080830180516001600160e01b031663e8eda9df60e01b17905290516107f993929101611d65565b50949350505050565b6000806110b0868686610830565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663b16a19de6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561111d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111419190611de2565b8160008151811061115457611154611d89565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ef9190611de2565b6001600160a01b0316336001600160a01b03161461121f5760405162461bcd60e51b8152600401610a3490611dff565b6001600160a01b03838116600090815260026020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611287858585610ab3565b905061059c85858584610641565b6112f2604051806101400160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600064ffffffffff1681525090565b6112fb836116f2565b6040516335ea6a7560e01b81526001600160a01b03848116600483015291909116906335ea6a759060240161014060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611368919061202a565b9392505050565b600061137a82611747565b6001600160a01b0316630261bf8b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6060811561063957600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846113e688886117d0565b6040518363ffffffff1660e01b81526004016114039291906120a9565b600060405180830381865afa158015611420573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144891908101906120e6565b90506000816001835161145b9190612192565b8151811061146b5761146b611d89565b60200260200101511115611099576040805160038082526080820190925290816020015b606081526020019060019003908161148f5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b179052915192945061150992889201611d65565b6040516020818303038152906040528260008151811061152b5761152b611d89565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516115999288929101611d65565b604051602081830303815290604052826001815181106115bb576115bb611d89565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed17398560006115ee8a8a6117d0565b8b6000196040516024016116069594939291906121a9565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611644929190611d65565b6040516020818303038152906040528260028151811061166657611666611d89565b602002602001018190525050949350505050565b6000806001600054600160a01b900460ff16600181111561169d5761169d611b8c565b146116cd576001600160a01b038087166000908152600260209081526040808320938916835292905220546116d7565b6116d786846119ea565b90508084116116e657836116e8565b805b9695505050505050565b60006116fd82611747565b6040516321f8a72160e01b8152600160f81b60048201526001600160a01b0391909116906321f8a72190602401602060405180830381865afa15801561096b573d6000803e3d6000fd5b6000816001600160a01b031663365ccbbf6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611787573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117af91908101906121e5565b6000815181106117c1576117c1611d89565b60200260200101519050919050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611898576040805160028082526060820183529091602083019080368337019050509050828160008151811061182b5761182b611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061187357611873611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050610401565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611939576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061190557611905611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061187357611873611d89565b604080516003808252608082019092529060208201606080368337019050509050828160008151811061196e5761196e611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106119b6576119b6611d89565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061115457611154611d89565b6001600160a01b038216600090815260036020526040812054818115611a2657612710611a178386612274565b611a219190612293565b61059c565b61271060015485611a379190612274565b61059c9190612293565b6001600160a01b0381168114611a5657600080fd5b50565b60008060408385031215611a6c57600080fd5b8235611a7781611a41565b91506020830135611a8781611a41565b809150509250929050565b600080600060608486031215611aa757600080fd5b8335611ab281611a41565b92506020840135611ac281611a41565b91506040840135611ad281611a41565b809150509250925092565b6000815180845260005b81811015611b0357602081850181015186830182015201611ae7565b81811115611b15576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611b7f57603f19888603018452611b6d858351611add565b94509285019290850190600101611b51565b5092979650505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160028310611bc457634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215611bdc57600080fd5b813561136881611a41565b60008060008060808587031215611bfd57600080fd5b8435611c0881611a41565b93506020850135611c1881611a41565b92506040850135611c2881611a41565b9396929550929360600135925050565b600060208284031215611c4a57600080fd5b81356002811061136857600080fd5b600080600060608486031215611c6e57600080fd5b8335611c7981611a41565b92506020840135611c8981611a41565b929592945050506040919091013590565b60008060408385031215611cad57600080fd5b8235611cb881611a41565b946020939093013593505050565b600060208284031215611cd857600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611d185781516001600160a01b031687529582019590820190600101611cf3565b509495945050505050565b6020815260006113686020830184611cdf565b600060208284031215611d4857600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038316815260406020820181905260009061063990830184611add565b634e487b7160e01b600052603260045260246000fd5b606081526000611db26060830186611cdf565b6020830194909452506001600160a01b0391909116604090910152919050565b8051611ddd81611a41565b919050565b600060208284031215611df457600080fd5b815161136881611a41565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b604051610180810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b60405290565b604051610140810167ffffffffffffffff81118282101715611e5a57611e5a611d4f565b604051601f8201601f1916810167ffffffffffffffff81118282101715611ead57611ead611d4f565b604052919050565b600060208284031215611ec757600080fd5b6040516020810181811067ffffffffffffffff82111715611eea57611eea611d4f565b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff81168114611ddd57600080fd5b805164ffffffffff81168114611ddd57600080fd5b805160ff81168114611ddd57600080fd5b60006101808284031215611f5057600080fd5b611f58611e36565b611f628484611eb5565b8152611f7060208401611ef7565b6020820152611f8160408401611ef7565b6040820152611f9260608401611ef7565b6060820152611fa360808401611ef7565b6080820152611fb460a08401611ef7565b60a0820152611fc560c08401611f17565b60c0820152611fd660e08401611dd2565b60e0820152610100611fe9818501611dd2565b90820152610120611ffb848201611dd2565b9082015261014061200d848201611dd2565b9082015261016061201f848201611f2c565b908201529392505050565b6000610140828403121561203d57600080fd5b612045611e60565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151818301525061012061201f818501611f17565b8281526040602082015260006106396040830184611cdf565b600067ffffffffffffffff8211156120dc576120dc611d4f565b5060051b60200190565b600060208083850312156120f957600080fd5b825167ffffffffffffffff81111561211057600080fd5b8301601f8101851361212157600080fd5b805161213461212f826120c2565b611e84565b81815260059190911b8201830190838101908783111561215357600080fd5b928401925b8284101561217157835182529284019290840190612158565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121a4576121a461217c565b500390565b85815284602082015260a0604082015260006121c860a0830186611cdf565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156121f857600080fd5b825167ffffffffffffffff81111561220f57600080fd5b8301601f8101851361222057600080fd5b805161222e61212f826120c2565b81815260059190911b8201830190838101908783111561224d57600080fd5b928401925b8284101561217157835161226581611a41565b82529284019290840190612252565b600081600019048311821515161561228e5761228e61217c565b500290565b6000826122b057634e487b7160e01b600052601260045260246000fd5b50049056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/ApeSwapPoolAdapter.json b/deployments/polygon/ApeSwapPoolAdapter.json new file mode 100644 index 000000000..ca3365fc9 --- /dev/null +++ b/deployments/polygon/ApeSwapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x059035c4b7D320d6Ea7A278230178fE136EAE76c", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "apeswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factoryRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xee8d0e1e2b11e27c2a182fde7c93f02a4a4af3d03ad56eb059b1bab5b7b72b88", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x059035c4b7D320d6Ea7A278230178fE136EAE76c", + "transactionIndex": 26, + "gasUsed": "2262287", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0x4f5be69933594431f9306e5f75c922d0c9c6c9622e02f825b3842f87f5494224", + "transactionHash": "0xee8d0e1e2b11e27c2a182fde7c93f02a4a4af3d03ad56eb059b1bab5b7b72b88", + "logs": [ + { + "transactionIndex": 26, + "blockNumber": 26876073, + "transactionHash": "0xee8d0e1e2b11e27c2a182fde7c93f02a4a4af3d03ad56eb059b1bab5b7b72b88", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x0000000000000000000000000000000000000000000000000191dce6e760cd89000000000000000000000000000000000000000000000000289adf46139820000000000000000000000000000000000000000000000005a6ff2d835f2a542f8d0000000000000000000000000000000000000000000000002709025f2c3752770000000000000000000000000000000000000000000005a700bf604611b4fd16", + "logIndex": 58, + "blockHash": "0x4f5be69933594431f9306e5f75c922d0c9c6c9622e02f825b3842f87f5494224" + } + ], + "blockNumber": 26876073, + "cumulativeGasUsed": "5406681", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027663803806200276683398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b580620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80637c47b3f4116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b80637c47b3f41461034857806385541e441461035d57806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c57806367ddfad91461031f578063770788721461033a57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e373cf083be4164828f00cae704ec15a36d71149128481565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e373c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b6101e3610290366004612232565b61035b61035636600461239a565b610bb4565b005b61022b61036b3660046123bb565b610cc4565b61022b61037e36600461224f565b610e93565b61022b61271081565b61035b61039a3660046123fc565b610f01565b61035b6103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b61035b6103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61035b61043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273c0788a3ad43d79aa53b09c2eacc313a787d1d607906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273c0788a3ad43d79aa53b09c2eacc313a787d1d6078885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b031673cf083be4164828f00cae704ec15a36d7114912846001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd6003866124e6565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107cc611e07846107ce6124c7565b611e38611e1786623ce9c46124c7565b611e2486623ce9c06124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e66124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c35760003560e01c80637c47b3f4116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b80637c47b3f41461034857806385541e441461035d57806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c57806367ddfad91461031f578063770788721461033a57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e373cf083be4164828f00cae704ec15a36d71149128481565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e373c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b6101e3610290366004612232565b61035b61035636600461239a565b610bb4565b005b61022b61036b3660046123bb565b610cc4565b61022b61037e36600461224f565b610e93565b61022b61271081565b61035b61039a3660046123fc565b610f01565b61035b6103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b61035b6103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61035b61043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273c0788a3ad43d79aa53b09c2eacc313a787d1d607906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273c0788a3ad43d79aa53b09c2eacc313a787d1d6078885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b031673cf083be4164828f00cae704ec15a36d7114912846001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd6003866124e6565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107cc611e07846107ce6124c7565b611e38611e1786623ce9c46124c7565b611e2486623ce9c06124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e66124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/BeefyFinanceAdapter.json b/deployments/polygon/BeefyFinanceAdapter.json new file mode 100644 index 000000000..d6d20986c --- /dev/null +++ b/deployments/polygon/BeefyFinanceAdapter.json @@ -0,0 +1,1315 @@ +{ + "address": "0x3a60CaD68b2d469B63060a5904A5F74c8aD46d98", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "BIFI", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BIFI_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BIFI_STAKE_VAULT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DAI_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MOO_POLYGON_BIFI_STAKE_VAULT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WATCH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBTC_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH_DEPOSIT_POOL", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "apeswapRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmountStake", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInTokenStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalanceStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getStakeAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getStakeSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getUnstakeAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getUnstakeAndWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "getUnstakeAndWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getUnstakeSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficientStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToStakingVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakingVaultToRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xfbb368c9da09b4c03c99d4ae9a755fc780483c3ff487833844b459d9d1a8245b", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3a60CaD68b2d469B63060a5904A5F74c8aD46d98", + "transactionIndex": 18, + "gasUsed": "2453400", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0x4ab79f91575f4489ff8f209201b57e833bab96ae1c5639bcdd809aa1ff86b385", + "transactionHash": "0xfbb368c9da09b4c03c99d4ae9a755fc780483c3ff487833844b459d9d1a8245b", + "logs": [ + { + "transactionIndex": 18, + "blockNumber": 26876059, + "transactionHash": "0xfbb368c9da09b4c03c99d4ae9a755fc780483c3ff487833844b459d9d1a8245b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x00000000000000000000000000000000000000000000000001b3cfb70a5b3bc80000000000000000000000000000000000000000000000002ed98c10ec2350000000000000000000000000000000000000000000000005a63a41baa48a9a78220000000000000000000000000000000000000000000000002d25bc59e1c814380000000000000000000000000000000000000000000005a63bf58a5b94f5b3ea", + "logIndex": 64, + "blockHash": "0x4ab79f91575f4489ff8f209201b57e833bab96ae1c5639bcdd809aa1ff86b385" + } + ], + "blockNumber": 26876059, + "cumulativeGasUsed": "4973322", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002a9738038062002a97833981016040819052620000349162000173565b600080546127106001556001600160a01b03929092166001600160a81b031990921691909117600160a01b1781557f8bddf24ded73b7c9dba4d38c3f1b5be079befb55bf9fa3128f90c4899e7205ce80546001600160a01b031990811673deb0a777ba6f59c78c654b8c92f80238c8002dd2179091557f3c8c345f0018462db38a9c11650917511d105567eaa0e87e44b3875d7647dd18805482167371a4449dd18177a1a19fef671558964f10af4be890811790915560056020527f51ae4f7ea34cb0b6456090b07323f0e62c0b854f43c247a19185cadd41511d2580548316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701790559091527fd0246301541db8978c3f99466b558b96ebb06f5b112a6c440f0ace4b3736b86580549091167309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b2179055620001a5565b6000602082840312156200018657600080fd5b81516001600160a01b03811681146200019e57600080fd5b9392505050565b6128e280620001b56000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c80637df50ed8116101b8578063b3fe7f5a11610104578063ecdd76f3116100a2578063ef856be91161007c578063ef856be9146107c9578063f1aacbb7146107e9578063f49307ca146107fc578063fd1365ea1461080f57600080fd5b8063ecdd76f314610780578063ecebc29c1461079b578063ee665bed146107b657600080fd5b8063da699f96116100de578063da699f961461072c578063df9357221461073f578063e085edc514610752578063e49d5ecc1461076d57600080fd5b8063b3fe7f5a146106f3578063d463fcf614610706578063d74baaf81461071957600080fd5b80639c115fd111610171578063a68da4aa1161014b578063a68da4aa14610697578063a91ee0dc146106b2578063a9842ff4146106c5578063afd908d9146106e057600080fd5b80639c115fd11461064e578063a2e7f8c414610661578063a61d81081461067c57600080fd5b80637df50ed8146105d15780638476fdec146105e757806385541e44146105fa57806390e06fc21461060d57806390e6160514610628578063919b69d71461063b57600080fd5b80634ad36e021161027757806364dd5f80116102305780637213c07c1161020a5780637213c07c1461056d57806374df3b2f1461059657806377078872146105a95780637c47b3f4146105bc57600080fd5b806364dd5f801461052c57806367ddfad91461053f5780636d267d7c1461055a57600080fd5b80634ad36e02146104a55780634d9e541a146104b85780634f83b52d146104d35780635adca02e146104f35780635e6502e014610506578063609257791461051957600080fd5b80632627a099116102e45780632af06b96116102be5780632af06b961461043b5780632de778381461045c57806336d8bf931461046f578063489b52951461049257600080fd5b80632627a0991461040257806328c1f99b14610415578063292ccf021461042857600080fd5b8063027a304d1461032c5780630c9d8d5c1461036a57806315b550d61461038a578063179af4e5146103bd578063191c194b146103d057806325e45978146103d9575b600080fd5b61035761033a3660046122b7565b600360209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61037d6103783660046122f0565b610822565b6040516103619190612388565b6103a5730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6040516001600160a01b039091168152602001610361565b61037d6103cb3660046122f0565b6108b2565b61035760015481565b6103a56103e73660046123ea565b6004602052600090815260409020546001600160a01b031681565b6103576104103660046122f0565b6108ce565b6000546103a5906001600160a01b031681565b61037d61043636600461240e565b610a56565b60005461044f90600160a01b900460ff1681565b6040516103619190612475565b61035761046a3660046122b7565b610b1a565b61048261047d3660046123ea565b610b87565b6040519015158152602001610361565b61037d6104a03660046122f0565b610bbe565b6103576104b336600461240e565b610c3c565b6103a57309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b281565b6103576104e13660046123ea565b60026020526000908152604090205481565b61035761050136600461240e565b610c86565b61037d6105143660046122b7565b610d56565b61037d61052736600461240e565b610d70565b61035761053a3660046122f0565b610e0d565b6103a573c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b61037d6105683660046122b7565b610e1f565b6103a561057b3660046123ea565b6005602052600090815260409020546001600160a01b031681565b61037d6105a43660046122f0565b610ed8565b6103a56105b73660046123ea565b610ef3565b6105cf6105ca36600461249d565b610f20565b005b61037d6105df3660046122b7565b606092915050565b6104826105f536600461240e565b611044565b6103576106083660046124be565b61105f565b6103a573d3395577febc6adab25490a69955ebc47040766c81565b6103576106363660046122f0565b611144565b6105cf6106493660046124ff565b6111b3565b61037d61065c3660046124ff565b6112a1565b6103a57377276a7c9ff3a6cbd334524d6f1f6219d039ac0e81565b6103a5739b36eceac46b70acfb7c2d6f3fd51aea87c3101881565b6103a573deb0a777ba6f59c78c654b8c92f80238c8002dd281565b6105cf6106c03660046123ea565b611482565b6103a573e71f3c11d4535a7f8c5fb03fda57899b2c9c721f81565b6103576106ee3660046122b7565b611579565b6103576107013660046122f0565b6115c9565b61037d61071436600461240e565b611615565b6103a56107273660046122b7565b919050565b6105cf61073a36600461252b565b61162b565b61037d61074d36600461240e565b611705565b6103a57371a4449dd18177a1a19fef671558964f10af4be881565b61048261077b36600461240e565b611970565b6103a573fecf784f48125ccb7d8855cdda7c5ed6b5024cb381565b6103a573fbdd194376de19a88118e84e279b977f165d01b881565b6103576107c43660046124be565b61197e565b6107dc6107d73660046122b7565b611a73565b6040516103619190612588565b6105cf6107f73660046124be565b611b30565b61037d61080a3660046122f0565b611c2e565b61037d61081d3660046124ff565b611c4b565b6060600061082f83610ef3565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061259b565b90506108a985858584611615565b95945050505050565b606060006108c08584611579565b90506108a985858584610a56565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610920918a91016001600160a01b0391909116815260200190565b602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610961919061259b565b905080156108a957836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb919061259b565b6109d690600a6126ae565b846001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061259b565b610a4290836126ba565b610a4c91906126d9565b9695505050505050565b60608115610b12576040805160028082526060820190925290816020015b6060815260200190600190039081610a74579050509050610a958383611c4b565b600081518110610aa757610aa7612711565b602002602001015181600081518110610ac257610ac2612711565b6020026020010181905250610ad985858585610d70565b600081518110610aeb57610aeb612711565b602002602001015181600181518110610b0657610b06612711565b60200260200101819052505b949350505050565b6000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e919061259b565b90505b92915050565b60006001600160a01b03821673fbdd194376de19a88118e84e279b977f165d01b81415610bb657506001919050565b506000919050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e919061259b565b90506108a985858584611705565b600080610c4a868686611144565b90506000610c59878787610e0d565b905080610c6685846126ba565b610c7091906126d9565b610c7b906001612727565b979650505050505050565b6001600160a01b0380831660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610cd8918b91016001600160a01b0391909116815260200190565b602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d19919061259b565b90506000610d288888886108ce565b905080610d3586846126ba565b610d3f91906126d9565b610d4a906001612727565b98975050505050505050565b60606000610d648484611579565b9050610b128382611c4b565b60608115610b125760408051600180825281830190925290816020015b6060815260200190600190039081610d8d579050509050826040516024810184905260440160408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610deb9392910161273f565b60405160208183030381529060405281600081518110610b0657610b06612711565b6000610b1283836107c4878787611144565b6001600160a01b038181166000908152600460205260409081902054815160018082528184019093526060939190911691816020015b6060815260200190600190039081610e55579050506040805160048152602481018252602080820180516001600160e01b0316631e8c5c8960e11b1790529151929450610ea49284920161273f565b60405160208183030381529060405282600081518110610ec657610ec6612711565b60200260200101819052505092915050565b60606000610ee7858585611144565b90506108a983826112a1565b6001600160a01b039081166000908152600460209081526040808320548416835260059091529020541690565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612763565b6001600160a01b0316336001600160a01b031614610fce5760405162461bcd60e51b8152600401610fc590612780565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610ff357610ff361245f565b02179055506000543390600160a01b900460ff1660018111156110185761101861245f565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806110528686866108ce565b9092111595945050505050565b6000826001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c3919061259b565b836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611101573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611125919061259b565b61113090600a6126ae565b61113a90846126ba565b610b1291906126d9565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a08231906024015b602060405180830381865afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061259b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190612763565b6001600160a01b0316336001600160a01b0316146112585760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60608115610b81576001600160a01b03838116600090815260046020526040812054909116908460408051600380825260808201909252919250816020015b60608152602001906001900390816112e0579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161134f9392910161273f565b6040516020818303038152906040528360008151811061137157611371612711565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516113d39392910161273f565b604051602081830303815290604052836001815181106113f5576113f5612711565b6020026020010181905250818460405160240161141491815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663534a7e1d60e11b179052905161144d9392910161273f565b6040516020818303038152906040528360028151811061146f5761146f612711565b6020026020010181905250505092915050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f79190612763565b6001600160a01b0316336001600160a01b0316146115575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610fc5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b81529293169182916370a0823191611172918891016001600160a01b0391909116815260200190565b6001600160a01b0380831660009081526004602081905260408083205490516246613160e11b815292931691628cc26291611172918891016001600160a01b0391909116815260200190565b60606108a98561162485610ef3565b8685611ce9565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190612763565b6001600160a01b0316336001600160a01b0316146116d05760405162461bcd60e51b8152600401610fc590612780565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000821161174d5760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b6044820152606401610fc5565b6000611765848685611760886000610b1a565b611f73565b9050600081116117b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e74206465706f73697420616d6f756e7400000000006044820152606401610fc5565b6040805160038082526080820190925290816020015b60608152602001906001900390816117cd579050506040516001600160a01b038616602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161183c9392910161273f565b6040516020818303038152906040528260008151811061185e5761185e612711565b60209081029190910101526040516001600160a01b038516602482015260448101829052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516118c09392910161273f565b604051602081830303815290604052826001815181106118e2576118e2612711565b6020026020010181905250838160405160240161190191815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663b6b55f2560e01b179052905161193a9392910161273f565b6040516020818303038152906040528260028151811061195c5761195c612711565b602002602001018190525050949350505050565b600080611052868686610e0d565b60008115611a6c57826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e8919061259b565b6119f390600a6126ae565b836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a55919061259b565b611a5f90846126ba565b611a6991906126d9565b91505b5092915050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190612763565b81600081518110611b0a57611b0a612711565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190612763565b6001600160a01b0316336001600160a01b031614611bd55760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03838116600090815260036020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611c3d858585611144565b90506108a985858584610d70565b60608115610b81576001600160a01b0383811660009081526004602052604090819020548151600180825281840190935292169190816020015b6060815260200190600190039081611c855790505091508083604051602401611cb091815260200190565b60408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610ea49392910161273f565b60608115610b1257600073c0788a3ad43d79aa53b09c2eacc313a787d1d60763d06ca61f84611d188888611fdf565b6040518363ffffffff1660e01b8152600401611d359291906127b7565b600060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d7a91908101906127d0565b905060008160018351611d8d9190612882565b81518110611d9d57611d9d612711565b60200260200101511115611f6a576040805160038082526080820190925290816020015b6060815260200190600190039081611dc15790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611e3b9392910161273f565b60405160208183030381529060405282600081518110611e5d57611e5d612711565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101849052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611eca9392910161273f565b60405160208183030381529060405282600181518110611eec57611eec612711565b602002602001018190525073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000611f198888611fdf565b89600019604051602401611f31959493929190612899565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b179052905161193a9392910161273f565b50949350505050565b6000806001600054600160a01b900460ff166001811115611f9657611f9661245f565b14611fc6576001600160a01b03808716600090815260036020908152604080832093891683529290522054611fd0565b611fd08684612248565b90508084116108a95783610a4c565b6060600073c0788a3ad43d79aa53b09c2eacc313a787d1d6076001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612035573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120599190612763565b9050806001600160a01b0316836001600160a01b0316141561210257604080516002808252606082018352909160208301908036833701905050915083826000815181106120a9576120a9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106120dd576120dd612711565b60200260200101906001600160a01b031690816001600160a01b031681525050611a6c565b806001600160a01b0316846001600160a01b03161415612184576040805160028082526060820183529091602083019080368337019050509150808260008151811061215057612150612711565b60200260200101906001600160a01b031690816001600160a01b03168152505082826001815181106120dd576120dd612711565b60408051600380825260808201909252906020820160608036833701905050915083826000815181106121b9576121b9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106121ed576121ed612711565b60200260200101906001600160a01b031690816001600160a01b031681525050828260028151811061222157612221612711565b60200260200101906001600160a01b031690816001600160a01b0316815250505092915050565b6001600160a01b0382166000908152600260205260408120548181156122845761271061227583866126ba565b61227f91906126d9565b6108a9565b6127106001548561229591906126ba565b6108a991906126d9565b6001600160a01b03811681146122b457600080fd5b50565b600080604083850312156122ca57600080fd5b82356122d58161229f565b915060208301356122e58161229f565b809150509250929050565b60008060006060848603121561230557600080fd5b83356123108161229f565b925060208401356123208161229f565b915060408401356123308161229f565b809150509250925092565b6000815180845260005b8181101561236157602081850181015186830182015201612345565b81811115612373576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123dd57603f198886030184526123cb85835161233b565b945092850192908501906001016123af565b5092979650505050505050565b6000602082840312156123fc57600080fd5b81356124078161229f565b9392505050565b6000806000806080858703121561242457600080fd5b843561242f8161229f565b9350602085013561243f8161229f565b9250604085013561244f8161229f565b9396929550929360600135925050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061249757634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156124af57600080fd5b81356002811061240757600080fd5b6000806000606084860312156124d357600080fd5b83356124de8161229f565b925060208401356124ee8161229f565b929592945050506040919091013590565b6000806040838503121561251257600080fd5b823561251d8161229f565b946020939093013593505050565b60006020828403121561253d57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561257d5781516001600160a01b031687529582019590820190600101612558565b509495945050505050565b602081526000610b7e6020830184612544565b6000602082840312156125ad57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156126055781600019048211156125eb576125eb6125b4565b808516156125f857918102915b93841c93908002906125cf565b509250929050565b60008261261c57506001610b81565b8161262957506000610b81565b816001811461263f576002811461264957612665565b6001915050610b81565b60ff84111561265a5761265a6125b4565b50506001821b610b81565b5060208310610133831016604e8410600b8410161715612688575081810a610b81565b61269283836125ca565b80600019048211156126a6576126a66125b4565b029392505050565b6000610b7e838361260d565b60008160001904831182151516156126d4576126d46125b4565b500290565b6000826126f657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000821982111561273a5761273a6125b4565b500190565b6001600160a01b0383168152604060208201819052600090610b129083018461233b565b60006020828403121561277557600080fd5b81516124078161229f565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b828152604060208201526000610b126040830184612544565b600060208083850312156127e357600080fd5b825167ffffffffffffffff808211156127fb57600080fd5b818501915085601f83011261280f57600080fd5b815181811115612821576128216126fb565b8060051b604051601f19603f83011681018181108582111715612846576128466126fb565b60405291825284820192508381018501918883111561286457600080fd5b938501935b82851015610d4a57845184529385019392850192612869565b600082821015612894576128946125b4565b500390565b85815284602082015260a0604082015260006128b860a0830186612544565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103275760003560e01c80637df50ed8116101b8578063b3fe7f5a11610104578063ecdd76f3116100a2578063ef856be91161007c578063ef856be9146107c9578063f1aacbb7146107e9578063f49307ca146107fc578063fd1365ea1461080f57600080fd5b8063ecdd76f314610780578063ecebc29c1461079b578063ee665bed146107b657600080fd5b8063da699f96116100de578063da699f961461072c578063df9357221461073f578063e085edc514610752578063e49d5ecc1461076d57600080fd5b8063b3fe7f5a146106f3578063d463fcf614610706578063d74baaf81461071957600080fd5b80639c115fd111610171578063a68da4aa1161014b578063a68da4aa14610697578063a91ee0dc146106b2578063a9842ff4146106c5578063afd908d9146106e057600080fd5b80639c115fd11461064e578063a2e7f8c414610661578063a61d81081461067c57600080fd5b80637df50ed8146105d15780638476fdec146105e757806385541e44146105fa57806390e06fc21461060d57806390e6160514610628578063919b69d71461063b57600080fd5b80634ad36e021161027757806364dd5f80116102305780637213c07c1161020a5780637213c07c1461056d57806374df3b2f1461059657806377078872146105a95780637c47b3f4146105bc57600080fd5b806364dd5f801461052c57806367ddfad91461053f5780636d267d7c1461055a57600080fd5b80634ad36e02146104a55780634d9e541a146104b85780634f83b52d146104d35780635adca02e146104f35780635e6502e014610506578063609257791461051957600080fd5b80632627a099116102e45780632af06b96116102be5780632af06b961461043b5780632de778381461045c57806336d8bf931461046f578063489b52951461049257600080fd5b80632627a0991461040257806328c1f99b14610415578063292ccf021461042857600080fd5b8063027a304d1461032c5780630c9d8d5c1461036a57806315b550d61461038a578063179af4e5146103bd578063191c194b146103d057806325e45978146103d9575b600080fd5b61035761033a3660046122b7565b600360209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61037d6103783660046122f0565b610822565b6040516103619190612388565b6103a5730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b6040516001600160a01b039091168152602001610361565b61037d6103cb3660046122f0565b6108b2565b61035760015481565b6103a56103e73660046123ea565b6004602052600090815260409020546001600160a01b031681565b6103576104103660046122f0565b6108ce565b6000546103a5906001600160a01b031681565b61037d61043636600461240e565b610a56565b60005461044f90600160a01b900460ff1681565b6040516103619190612475565b61035761046a3660046122b7565b610b1a565b61048261047d3660046123ea565b610b87565b6040519015158152602001610361565b61037d6104a03660046122f0565b610bbe565b6103576104b336600461240e565b610c3c565b6103a57309211dc67f9fe98fb7bbb91be0ef05f4a12fa2b281565b6103576104e13660046123ea565b60026020526000908152604090205481565b61035761050136600461240e565b610c86565b61037d6105143660046122b7565b610d56565b61037d61052736600461240e565b610d70565b61035761053a3660046122f0565b610e0d565b6103a573c0788a3ad43d79aa53b09c2eacc313a787d1d60781565b61037d6105683660046122b7565b610e1f565b6103a561057b3660046123ea565b6005602052600090815260409020546001600160a01b031681565b61037d6105a43660046122f0565b610ed8565b6103a56105b73660046123ea565b610ef3565b6105cf6105ca36600461249d565b610f20565b005b61037d6105df3660046122b7565b606092915050565b6104826105f536600461240e565b611044565b6103576106083660046124be565b61105f565b6103a573d3395577febc6adab25490a69955ebc47040766c81565b6103576106363660046122f0565b611144565b6105cf6106493660046124ff565b6111b3565b61037d61065c3660046124ff565b6112a1565b6103a57377276a7c9ff3a6cbd334524d6f1f6219d039ac0e81565b6103a5739b36eceac46b70acfb7c2d6f3fd51aea87c3101881565b6103a573deb0a777ba6f59c78c654b8c92f80238c8002dd281565b6105cf6106c03660046123ea565b611482565b6103a573e71f3c11d4535a7f8c5fb03fda57899b2c9c721f81565b6103576106ee3660046122b7565b611579565b6103576107013660046122f0565b6115c9565b61037d61071436600461240e565b611615565b6103a56107273660046122b7565b919050565b6105cf61073a36600461252b565b61162b565b61037d61074d36600461240e565b611705565b6103a57371a4449dd18177a1a19fef671558964f10af4be881565b61048261077b36600461240e565b611970565b6103a573fecf784f48125ccb7d8855cdda7c5ed6b5024cb381565b6103a573fbdd194376de19a88118e84e279b977f165d01b881565b6103576107c43660046124be565b61197e565b6107dc6107d73660046122b7565b611a73565b6040516103619190612588565b6105cf6107f73660046124be565b611b30565b61037d61080a3660046122f0565b611c2e565b61037d61081d3660046124ff565b611c4b565b6060600061082f83610ef3565b6040516370a0823160e01b81526001600160a01b03878116600483015291909116906370a0823190602401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061259b565b90506108a985858584611615565b95945050505050565b606060006108c08584611579565b90506108a985858584610a56565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610920918a91016001600160a01b0391909116815260200190565b602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610961919061259b565b905080156108a957836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb919061259b565b6109d690600a6126ae565b846001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061259b565b610a4290836126ba565b610a4c91906126d9565b9695505050505050565b60608115610b12576040805160028082526060820190925290816020015b6060815260200190600190039081610a74579050509050610a958383611c4b565b600081518110610aa757610aa7612711565b602002602001015181600081518110610ac257610ac2612711565b6020026020010181905250610ad985858585610d70565b600081518110610aeb57610aeb612711565b602002602001015181600181518110610b0657610b06612711565b60200260200101819052505b949350505050565b6000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7e919061259b565b90505b92915050565b60006001600160a01b03821673fbdd194376de19a88118e84e279b977f165d01b81415610bb657506001919050565b506000919050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610c0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e919061259b565b90506108a985858584611705565b600080610c4a868686611144565b90506000610c59878787610e0d565b905080610c6685846126ba565b610c7091906126d9565b610c7b906001612727565b979650505050505050565b6001600160a01b0380831660009081526004602081905260408083205490516370a0823160e01b815292931691839183916370a0823191610cd8918b91016001600160a01b0391909116815260200190565b602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d19919061259b565b90506000610d288888886108ce565b905080610d3586846126ba565b610d3f91906126d9565b610d4a906001612727565b98975050505050505050565b60606000610d648484611579565b9050610b128382611c4b565b60608115610b125760408051600180825281830190925290816020015b6060815260200190600190039081610d8d579050509050826040516024810184905260440160408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610deb9392910161273f565b60405160208183030381529060405281600081518110610b0657610b06612711565b6000610b1283836107c4878787611144565b6001600160a01b038181166000908152600460205260409081902054815160018082528184019093526060939190911691816020015b6060815260200190600190039081610e55579050506040805160048152602481018252602080820180516001600160e01b0316631e8c5c8960e11b1790529151929450610ea49284920161273f565b60405160208183030381529060405282600081518110610ec657610ec6612711565b60200260200101819052505092915050565b60606000610ee7858585611144565b90506108a983826112a1565b6001600160a01b039081166000908152600460209081526040808320548416835260059091529020541690565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612763565b6001600160a01b0316336001600160a01b031614610fce5760405162461bcd60e51b8152600401610fc590612780565b60405180910390fd5b6000805482919060ff60a01b1916600160a01b836001811115610ff357610ff361245f565b02179055506000543390600160a01b900460ff1660018111156110185761101861245f565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806110528686866108ce565b9092111595945050505050565b6000826001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c3919061259b565b836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611101573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611125919061259b565b61113090600a6126ae565b61113a90846126ba565b610b1291906126d9565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a08231906024015b602060405180830381865afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b12919061259b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190612763565b6001600160a01b0316336001600160a01b0316146112585760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60608115610b81576001600160a01b03838116600090815260046020526040812054909116908460408051600380825260808201909252919250816020015b60608152602001906001900390816112e0579050506040516001600160a01b038416602482015260006044820152909350819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161134f9392910161273f565b6040516020818303038152906040528360008151811061137157611371612711565b60209081029190910101526040516001600160a01b038316602482015260448101859052819060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516113d39392910161273f565b604051602081830303815290604052836001815181106113f5576113f5612711565b6020026020010181905250818460405160240161141491815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663534a7e1d60e11b179052905161144d9392910161273f565b6040516020818303038152906040528360028151811061146f5761146f612711565b6020026020010181905250505092915050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f79190612763565b6001600160a01b0316336001600160a01b0316146115575760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610fc5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380821660009081526004602081905260408083205490516370a0823160e01b81529293169182916370a0823191611172918891016001600160a01b0391909116815260200190565b6001600160a01b0380831660009081526004602081905260408083205490516246613160e11b815292931691628cc26291611172918891016001600160a01b0391909116815260200190565b60606108a98561162485610ef3565b8685611ce9565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561167c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a09190612763565b6001600160a01b0316336001600160a01b0316146116d05760405162461bcd60e51b8152600401610fc590612780565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606000821161174d5760405162461bcd60e51b8152602060048201526013602482015272125b9cdd59999a58da595b9d08185b5bdd5b9d606a1b6044820152606401610fc5565b6000611765848685611760886000610b1a565b611f73565b9050600081116117b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e74206465706f73697420616d6f756e7400000000006044820152606401610fc5565b6040805160038082526080820190925290816020015b60608152602001906001900390816117cd579050506040516001600160a01b038616602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161183c9392910161273f565b6040516020818303038152906040528260008151811061185e5761185e612711565b60209081029190910101526040516001600160a01b038516602482015260448101829052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516118c09392910161273f565b604051602081830303815290604052826001815181106118e2576118e2612711565b6020026020010181905250838160405160240161190191815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663b6b55f2560e01b179052905161193a9392910161273f565b6040516020818303038152906040528260028151811061195c5761195c612711565b602002602001018190525050949350505050565b600080611052868686610e0d565b60008115611a6c57826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e8919061259b565b6119f390600a6126ae565b836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a55919061259b565b611a5f90846126ba565b611a6991906126d9565b91505b5092915050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190612763565b81600081518110611b0a57611b0a612711565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba59190612763565b6001600160a01b0316336001600160a01b031614611bd55760405162461bcd60e51b8152600401610fc590612780565b6001600160a01b03838116600090815260036020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611c3d858585611144565b90506108a985858584610d70565b60608115610b81576001600160a01b0383811660009081526004602052604090819020548151600180825281840190935292169190816020015b6060815260200190600190039081611c855790505091508083604051602401611cb091815260200190565b60408051601f19818403018152918152602080830180516001600160e01b0316632e1a7d4d60e01b1790529051610ea49392910161273f565b60608115610b1257600073c0788a3ad43d79aa53b09c2eacc313a787d1d60763d06ca61f84611d188888611fdf565b6040518363ffffffff1660e01b8152600401611d359291906127b7565b600060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d7a91908101906127d0565b905060008160018351611d8d9190612882565b81518110611d9d57611d9d612711565b60200260200101511115611f6a576040805160038082526080820190925290816020015b6060815260200190600190039081611dc15790505060405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260006044820152909250859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611e3b9392910161273f565b60405160208183030381529060405282600081518110611e5d57611e5d612711565b602090810291909101015260405173c0788a3ad43d79aa53b09c2eacc313a787d1d607602482015260448101849052859060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051611eca9392910161273f565b60405160208183030381529060405282600181518110611eec57611eec612711565b602002602001018190525073c0788a3ad43d79aa53b09c2eacc313a787d1d607836000611f198888611fdf565b89600019604051602401611f31959493929190612899565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b179052905161193a9392910161273f565b50949350505050565b6000806001600054600160a01b900460ff166001811115611f9657611f9661245f565b14611fc6576001600160a01b03808716600090815260036020908152604080832093891683529290522054611fd0565b611fd08684612248565b90508084116108a95783610a4c565b6060600073c0788a3ad43d79aa53b09c2eacc313a787d1d6076001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612035573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120599190612763565b9050806001600160a01b0316836001600160a01b0316141561210257604080516002808252606082018352909160208301908036833701905050915083826000815181106120a9576120a9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106120dd576120dd612711565b60200260200101906001600160a01b031690816001600160a01b031681525050611a6c565b806001600160a01b0316846001600160a01b03161415612184576040805160028082526060820183529091602083019080368337019050509150808260008151811061215057612150612711565b60200260200101906001600160a01b031690816001600160a01b03168152505082826001815181106120dd576120dd612711565b60408051600380825260808201909252906020820160608036833701905050915083826000815181106121b9576121b9612711565b60200260200101906001600160a01b031690816001600160a01b03168152505080826001815181106121ed576121ed612711565b60200260200101906001600160a01b031690816001600160a01b031681525050828260028151811061222157612221612711565b60200260200101906001600160a01b031690816001600160a01b0316815250505092915050565b6001600160a01b0382166000908152600260205260408120548181156122845761271061227583866126ba565b61227f91906126d9565b6108a9565b6127106001548561229591906126ba565b6108a991906126d9565b6001600160a01b03811681146122b457600080fd5b50565b600080604083850312156122ca57600080fd5b82356122d58161229f565b915060208301356122e58161229f565b809150509250929050565b60008060006060848603121561230557600080fd5b83356123108161229f565b925060208401356123208161229f565b915060408401356123308161229f565b809150509250925092565b6000815180845260005b8181101561236157602081850181015186830182015201612345565b81811115612373576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156123dd57603f198886030184526123cb85835161233b565b945092850192908501906001016123af565b5092979650505050505050565b6000602082840312156123fc57600080fd5b81356124078161229f565b9392505050565b6000806000806080858703121561242457600080fd5b843561242f8161229f565b9350602085013561243f8161229f565b9250604085013561244f8161229f565b9396929550929360600135925050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061249757634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156124af57600080fd5b81356002811061240757600080fd5b6000806000606084860312156124d357600080fd5b83356124de8161229f565b925060208401356124ee8161229f565b929592945050506040919091013590565b6000806040838503121561251257600080fd5b823561251d8161229f565b946020939093013593505050565b60006020828403121561253d57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561257d5781516001600160a01b031687529582019590820190600101612558565b509495945050505050565b602081526000610b7e6020830184612544565b6000602082840312156125ad57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156126055781600019048211156125eb576125eb6125b4565b808516156125f857918102915b93841c93908002906125cf565b509250929050565b60008261261c57506001610b81565b8161262957506000610b81565b816001811461263f576002811461264957612665565b6001915050610b81565b60ff84111561265a5761265a6125b4565b50506001821b610b81565b5060208310610133831016604e8410600b8410161715612688575081810a610b81565b61269283836125ca565b80600019048211156126a6576126a66125b4565b029392505050565b6000610b7e838361260d565b60008160001904831182151516156126d4576126d46125b4565b500290565b6000826126f657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000821982111561273a5761273a6125b4565b500190565b6001600160a01b0383168152604060208201819052600090610b129083018461233b565b60006020828403121561277557600080fd5b81516124078161229f565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b828152604060208201526000610b126040830184612544565b600060208083850312156127e357600080fd5b825167ffffffffffffffff808211156127fb57600080fd5b818501915085601f83011261280f57600080fd5b815181811115612821576128216126fb565b8060051b604051601f19603f83011681018181108582111715612846576128466126fb565b60405291825284820192508381018501918883111561286457600080fd5b938501935b82851015610d4a57845184529385019392850192612869565b600082821015612894576128946125b4565b500390565b85815284602082015260a0604082015260006128b860a0830186612544565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/CurveGaugeAdapter.json b/deployments/polygon/CurveGaugeAdapter.json new file mode 100644 index 000000000..58d1ccf40 --- /dev/null +++ b/deployments/polygon/CurveGaugeAdapter.json @@ -0,0 +1,925 @@ +{ + "address": "0x2600a57481C655dd6264f6a91A550504B800B261", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CRV", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WMATIC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "am3CrvGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "btcCrvGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "crvUSDBTCETHGauge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getAddLiquidityCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getClaimRewardTokenCode", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getHarvestAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardTokenAmount", + "type": "uint256" + } + ], + "name": "getHarvestSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getRewardTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_rewardTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnclaimedRewardTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nRewardTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapV2Router02", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rewardTokens", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_gauges", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_nRewardTokens", + "type": "uint256[]" + } + ], + "name": "setNRewardToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_gauges", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_indexes", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "_rewardTokens", + "type": "address[]" + } + ], + "name": "setRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd4f3f0589afd0144510decde98089d55d97c05eb44339e997c2a03d5cb182b26", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x2600a57481C655dd6264f6a91A550504B800B261", + "transactionIndex": 16, + "gasUsed": "1979676", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0xc4d28f76ef07454f55dc3c8bafa85cf15e636cbc4f67f1c620310314da84775e", + "transactionHash": "0xd4f3f0589afd0144510decde98089d55d97c05eb44339e997c2a03d5cb182b26", + "logs": [ + { + "transactionIndex": 16, + "blockNumber": 26876054, + "transactionHash": "0xd4f3f0589afd0144510decde98089d55d97c05eb44339e997c2a03d5cb182b26", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x000000000000000000000000000000000000000000000000015fa93dd92702f40000000000000000000000000000000000000000000000003039354ec9a800000000000000000000000000000000000000000000000005a5c7e34e11cc1d54570000000000000000000000000000000000000000000000002ed98c10f080fd0c0000000000000000000000000000000000000000000005a5c942f74fa544574b", + "logIndex": 43, + "blockHash": "0xc4d28f76ef07454f55dc3c8bafa85cf15e636cbc4f67f1c620310314da84775e" + } + ], + "blockNumber": 26876054, + "cumulativeGasUsed": "3856577", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x608060405234801561001057600080fd5b506040516120ee3803806120ee83398101604081905261002f91610203565b600080546001600160a01b03929092166001600160a01b03199283161781557f1a669c69d67b5f1480a749aa7d3d614b1e2cb51c7e789315c07a86c9dc56090c8054831673172370d5cd63279efa6d502dab29171933a610af9081179091557f1a669c69d67b5f1480a749aa7d3d614b1e2cb51c7e789315c07a86c9dc56090d80548416730d500b1d8e8ef31e21c99d1db9a6444d3adf127090811790915560027ffe2e9de55ee06647d2ba41a46297ce06920b2b593af05c3c2c817021e18fa6d28190557f7caf5542ca88e99b11ee72a7506603147f8871053f85e6eb7626adcfa081534080548616841790557f7caf5542ca88e99b11ee72a7506603147f8871053f85e6eb7626adcfa081534180548616831790557f1852561c65e6cee869bc4ced2bfd24646fc1245c6a06df837553fd17b654b9f081905573b0a366b987d77b5ed5803cbd95c80bb6deab48c09093527f9c5480277ad772a7210554d3f1bc85f8cd72c9acc19a90bb599b0b3058c825fb805485169092179091557f9c5480277ad772a7210554d3f1bc85f8cd72c9acc19a90bb599b0b3058c825fc80549093161790915560208190527f3243fcfb47fedb4b06547df4dcbd40df311965cdabc7be2a7a0c459e5b68b82f55610233565b60006020828403121561021557600080fd5b81516001600160a01b038116811461022c57600080fd5b9392505050565b611eac806102426000396000f3fe608060405234801561001057600080fd5b506004361061021b5760003560e01c80637707887211610125578063ab74dee1116100ad578063df9357221161007c578063df93572214610510578063e49d5ecc14610523578063ee665bed14610456578063ef856be914610536578063f49307ca1461054957600080fd5b8063ab74dee1146104c0578063b3fe7f5a146104d3578063d463fcf6146104ea578063d74baaf8146104fd57600080fd5b806385541e44116100f457806385541e441461045657806390e616051461046a578063945c91421461047d5780639712048714610498578063a91ee0dc146104ad57600080fd5b806377078872146103ff5780637df50ed81461040d57806381a4af151461042357806384773f251461043657600080fd5b8063489b5295116101a85780636092577911610177578063609257791461039057806364dd5f80146103a35780636667f1a6146103b65780636d267d7c146103d15780636fac53ee146103e457600080fd5b8063489b5295146103325780634ad36e02146103455780634d41a1e51461035a5780634d95cad91461037557600080fd5b806328c1f99b116101ef57806328c1f99b1461028f578063298916b2146102ba5780632de77838146102e057806332da07e2146102f357806336d8bf931461030e57600080fd5b806201b0b61461022057806304b87c4c146102495780630c9d8d5c1461026957806310f1fbe51461027c575b600080fd5b61023361022e36600461175a565b61055c565b60405161024091906117bb565b60405180910390f35b61025c6102573660046117ce565b610644565b6040516102409190611877565b61025c6102773660046118d9565b6106c7565b61025c61028a366004611924565b610773565b6000546102a2906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6102d26102c83660046117ce565b6000949350505050565b604051908152602001610240565b6102d26102ee366004611988565b61078b565b6102a273ffbacce0cc7c19d46132f1258fc16cf6871d153c81565b61032261031c36600461175a565b50600090565b6040519015158152602001610240565b61025c6103403660046118d9565b6107ef565b6102d26103533660046119c1565b9392505050565b6102a273a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b6102a2730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61025c61039e3660046119c1565b610868565b6102d26103b13660046118d9565b61091b565b6102a27319793b454d3afc7b454f206ffe95ade26ca6912c81565b61025c6103df366004611988565b610928565b6102a273b0a366b987d77b5ed5803cbd95c80bb6deab48c081565b6102a261031c36600461175a565b61025c61041b366004611988565b606092915050565b6102a2610431366004611a12565b6109da565b6102d261044436600461175a565b60026020526000908152604090205481565b6102d2610464366004611a3e565b92915050565b6102d26104783660046118d9565b610a08565b6102a273172370d5cd63279efa6d502dab29171933a610af81565b6104ab6104a6366004611bb9565b610a76565b005b6104ab6104bb36600461175a565b610caa565b6104ab6104ce366004611c41565b610d98565b6102d26104e13660046118d9565b60009392505050565b61025c6104f83660046119c1565b610f2a565b6102a261050b366004611988565b919050565b61025c61051e3660046119c1565b610f5a565b6103226105313660046119c1565b611113565b610233610544366004611988565b61112e565b61025c6105573660046118d9565b6111eb565b6001600160a01b0381166000908152600260205260409020546060908067ffffffffffffffff81111561059157610591611a7f565b6040519080825280602002602001820160405280156105ba578160200160208202803683370190505b50915060005b8181101561063d576001600160a01b038416600090815260016020526040902081600881106105f1576105f1611ca5565b015483516001600160a01b039091169084908390811061061357610613611ca5565b6001600160a01b03909216602092830291909101909101528061063581611cd1565b9150506105c0565b5050919050565b6040516370a0823160e01b81526001600160a01b0380861660048301526060916106bc91879187918791908716906370a0823190602401602060405180830381865afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190611cec565b90505b949350505050565b606060006106d48361055c565b6000815181106106e6576106e6611ca5565b60209081029190910101516040516370a0823160e01b81526001600160a01b038781166004830152909116906370a0823190602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190611cec565b905061076a85858584610f2a565b95945050505050565b606061078186848785611264565b9695505050505050565b6000826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103539190611cec565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009186918691908316906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051e9190611cec565b604080516001808252818301909252606091816020015b606081526020019060019003908161087f579050506040516024810184905260016044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b0316631c683a1b60e11b17905290516108e693929101611d05565b6040516020818303038152906040528160008151811061090857610908611ca5565b6020026020010181905250949350505050565b60006106bf848484610a08565b604080516001808252818301909252606091816020015b606081526020019060019003908161093f579050506040516001600160a01b0385166024820152909150829060440160408051601f19818403018152918152602080830180516001600160e01b0316634274debf60e11b17905290516109a793929101611d05565b604051602081830303815290604052816000815181106109c9576109c9611ca5565b602002602001018190525092915050565b600160205281600052604060002081600881106109f657600080fd5b01546001600160a01b03169150829050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190611cec565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d29565b6001600160a01b0316336001600160a01b031614610b245760405162461bcd60e51b8152600401610b1b90611d46565b60405180910390fd5b8251825181148015610b365750815181145b610b6c5760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610ca357610ba3858281518110610b8c57610b8c611ca5565b60200260200101516001600160a01b03163b151590565b610bbf5760405162461bcd60e51b8152600401610b1b90611d7d565b610bd4838281518110610b8c57610b8c611ca5565b610bf05760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610c0257610c02611ca5565b602002602001015160016000878481518110610c2057610c20611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020858381518110610c5a57610c5a611ca5565b602002602001015160088110610c7257610c72611ca5565b0180546001600160a01b0319166001600160a01b039290921691909117905580610c9b81611cd1565b915050610b6f565b5050505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f9190611d29565b6001600160a01b0316336001600160a01b031614610d4f5760405162461bcd60e51b8152600401610b1b90611d46565b6001600160a01b0381163b610d765760405162461bcd60e51b8152600401610b1b90611d7d565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611d29565b6001600160a01b0316336001600160a01b031614610e3d5760405162461bcd60e51b8152600401610b1b90611d46565b815181518114610e795760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610f2457610e99848281518110610b8c57610b8c611ca5565b610eb55760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610ec757610ec7611ca5565b602002602001015160026000868481518110610ee557610ee5611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610f1c90611cd1565b915050610e7c565b50505050565b60606106bc85610f398561055c565b600081518110610f4b57610f4b611ca5565b60200260200101518685611264565b60408051600380825260808201909252606091816020015b6060815260200190600190039081610f72575050604080516001600160a01b038616602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929350610fe192879201611d05565b6040516020818303038152906040528160008151811061100357611003611ca5565b602090810291909101810191909152604080516001600160a01b03861660248201526044808201869052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516110669287929101611d05565b6040516020818303038152906040528160018151811061108857611088611ca5565b6020908102919091010152604051602481018390526001600160a01b038616604482015260016064820152839060840160408051601f19818403018152918152602080830180516001600160e01b03166383df674760e01b17905290516110f193929101611d05565b6040516020818303038152906040528160028151811061090857610908611ca5565b60008061112186868661091b565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190611d29565b816000815181106111c5576111c5611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009182918691908216906370a0823190602401602060405180830381865afa158015611240573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039e9190611cec565b606081156106bf57600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846112938888611528565b6040518363ffffffff1660e01b81526004016112b0929190611da2565b600060405180830381865afa1580156112cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f59190810190611dbb565b9050600081600183516113089190611e4c565b8151811061131857611318611ca5565b6020026020010151111561151f576040805160038082526080820190925290816020015b606081526020019060019003908161133c5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b17905291519294506113b692889201611d05565b604051602081830303815290604052826000815181106113d8576113d8611ca5565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516114469288929101611d05565b6040516020818303038152906040528260018151811061146857611468611ca5565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed173985600061149b8a8a611528565b8b6000196040516024016114b3959493929190611e63565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506040516020016114f1929190611d05565b6040516020818303038152906040528260028151811061151357611513611ca5565b60200260200101819052505b50949350505050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf127014156115f0576040805160028082526060820183529091602083019080368337019050509050828160008151811061158357611583611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106115cb576115cb611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050610464565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611691576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061165d5761165d611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816001815181106115cb576115cb611ca5565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106116c6576116c6611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061170e5761170e611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816002815181106111c5576111c5611ca5565b6001600160a01b038116811461175757600080fd5b50565b60006020828403121561176c57600080fd5b813561035381611742565b600081518084526020808501945080840160005b838110156117b05781516001600160a01b03168752958201959082019060010161178b565b509495945050505050565b6020815260006103536020830184611777565b600080600080608085870312156117e457600080fd5b84356117ef81611742565b935060208501356117ff81611742565b9250604085013561180f81611742565b9150606085013561181f81611742565b939692955090935050565b6000815180845260005b8181101561185057602081850181015186830182015201611834565b81811115611862576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156118cc57603f198886030184526118ba85835161182a565b9450928501929085019060010161189e565b5092979650505050505050565b6000806000606084860312156118ee57600080fd5b83356118f981611742565b9250602084013561190981611742565b9150604084013561191981611742565b809150509250925092565b600080600080600060a0868803121561193c57600080fd5b853561194781611742565b9450602086013561195781611742565b9350604086013561196781611742565b9250606086013561197781611742565b949793965091946080013592915050565b6000806040838503121561199b57600080fd5b82356119a681611742565b915060208301356119b681611742565b809150509250929050565b600080600080608085870312156119d757600080fd5b84356119e281611742565b935060208501356119f281611742565b92506040850135611a0281611742565b9396929550929360600135925050565b60008060408385031215611a2557600080fd5b8235611a3081611742565b946020939093013593505050565b600080600060608486031215611a5357600080fd5b8335611a5e81611742565b92506020840135611a6e81611742565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611abe57611abe611a7f565b604052919050565b600067ffffffffffffffff821115611ae057611ae0611a7f565b5060051b60200190565b600082601f830112611afb57600080fd5b81356020611b10611b0b83611ac6565b611a95565b82815260059290921b84018101918181019086841115611b2f57600080fd5b8286015b84811015611b53578035611b4681611742565b8352918301918301611b33565b509695505050505050565b600082601f830112611b6f57600080fd5b81356020611b7f611b0b83611ac6565b82815260059290921b84018101918181019086841115611b9e57600080fd5b8286015b84811015611b535780358352918301918301611ba2565b600080600060608486031215611bce57600080fd5b833567ffffffffffffffff80821115611be657600080fd5b611bf287838801611aea565b94506020860135915080821115611c0857600080fd5b611c1487838801611b5e565b93506040860135915080821115611c2a57600080fd5b50611c3786828701611aea565b9150509250925092565b60008060408385031215611c5457600080fd5b823567ffffffffffffffff80821115611c6c57600080fd5b611c7886838701611aea565b93506020850135915080821115611c8e57600080fd5b50611c9b85828601611b5e565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ce557611ce5611cbb565b5060010190565b600060208284031215611cfe57600080fd5b5051919050565b6001600160a01b03831681526040602082018190526000906106bf9083018461182a565b600060208284031215611d3b57600080fd5b815161035381611742565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b8281526040602082015260006106bf6040830184611777565b60006020808385031215611dce57600080fd5b825167ffffffffffffffff811115611de557600080fd5b8301601f81018513611df657600080fd5b8051611e04611b0b82611ac6565b81815260059190911b82018301908381019087831115611e2357600080fd5b928401925b82841015611e4157835182529284019290840190611e28565b979650505050505050565b600082821015611e5e57611e5e611cbb565b500390565b85815284602082015260a060408201526000611e8260a0830186611777565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061021b5760003560e01c80637707887211610125578063ab74dee1116100ad578063df9357221161007c578063df93572214610510578063e49d5ecc14610523578063ee665bed14610456578063ef856be914610536578063f49307ca1461054957600080fd5b8063ab74dee1146104c0578063b3fe7f5a146104d3578063d463fcf6146104ea578063d74baaf8146104fd57600080fd5b806385541e44116100f457806385541e441461045657806390e616051461046a578063945c91421461047d5780639712048714610498578063a91ee0dc146104ad57600080fd5b806377078872146103ff5780637df50ed81461040d57806381a4af151461042357806384773f251461043657600080fd5b8063489b5295116101a85780636092577911610177578063609257791461039057806364dd5f80146103a35780636667f1a6146103b65780636d267d7c146103d15780636fac53ee146103e457600080fd5b8063489b5295146103325780634ad36e02146103455780634d41a1e51461035a5780634d95cad91461037557600080fd5b806328c1f99b116101ef57806328c1f99b1461028f578063298916b2146102ba5780632de77838146102e057806332da07e2146102f357806336d8bf931461030e57600080fd5b806201b0b61461022057806304b87c4c146102495780630c9d8d5c1461026957806310f1fbe51461027c575b600080fd5b61023361022e36600461175a565b61055c565b60405161024091906117bb565b60405180910390f35b61025c6102573660046117ce565b610644565b6040516102409190611877565b61025c6102773660046118d9565b6106c7565b61025c61028a366004611924565b610773565b6000546102a2906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b6102d26102c83660046117ce565b6000949350505050565b604051908152602001610240565b6102d26102ee366004611988565b61078b565b6102a273ffbacce0cc7c19d46132f1258fc16cf6871d153c81565b61032261031c36600461175a565b50600090565b6040519015158152602001610240565b61025c6103403660046118d9565b6107ef565b6102d26103533660046119c1565b9392505050565b6102a273a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b6102a2730d500b1d8e8ef31e21c99d1db9a6444d3adf127081565b61025c61039e3660046119c1565b610868565b6102d26103b13660046118d9565b61091b565b6102a27319793b454d3afc7b454f206ffe95ade26ca6912c81565b61025c6103df366004611988565b610928565b6102a273b0a366b987d77b5ed5803cbd95c80bb6deab48c081565b6102a261031c36600461175a565b61025c61041b366004611988565b606092915050565b6102a2610431366004611a12565b6109da565b6102d261044436600461175a565b60026020526000908152604090205481565b6102d2610464366004611a3e565b92915050565b6102d26104783660046118d9565b610a08565b6102a273172370d5cd63279efa6d502dab29171933a610af81565b6104ab6104a6366004611bb9565b610a76565b005b6104ab6104bb36600461175a565b610caa565b6104ab6104ce366004611c41565b610d98565b6102d26104e13660046118d9565b60009392505050565b61025c6104f83660046119c1565b610f2a565b6102a261050b366004611988565b919050565b61025c61051e3660046119c1565b610f5a565b6103226105313660046119c1565b611113565b610233610544366004611988565b61112e565b61025c6105573660046118d9565b6111eb565b6001600160a01b0381166000908152600260205260409020546060908067ffffffffffffffff81111561059157610591611a7f565b6040519080825280602002602001820160405280156105ba578160200160208202803683370190505b50915060005b8181101561063d576001600160a01b038416600090815260016020526040902081600881106105f1576105f1611ca5565b015483516001600160a01b039091169084908390811061061357610613611ca5565b6001600160a01b03909216602092830291909101909101528061063581611cd1565b9150506105c0565b5050919050565b6040516370a0823160e01b81526001600160a01b0380861660048301526060916106bc91879187918791908716906370a0823190602401602060405180830381865afa158015610698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190611cec565b90505b949350505050565b606060006106d48361055c565b6000815181106106e6576106e6611ca5565b60209081029190910101516040516370a0823160e01b81526001600160a01b038781166004830152909116906370a0823190602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190611cec565b905061076a85858584610f2a565b95945050505050565b606061078186848785611264565b9695505050505050565b6000826001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103539190611cec565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009186918691908316906370a0823190602401602060405180830381865afa158015610844573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051e9190611cec565b604080516001808252818301909252606091816020015b606081526020019060019003908161087f579050506040516024810184905260016044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b0316631c683a1b60e11b17905290516108e693929101611d05565b6040516020818303038152906040528160008151811061090857610908611ca5565b6020026020010181905250949350505050565b60006106bf848484610a08565b604080516001808252818301909252606091816020015b606081526020019060019003908161093f579050506040516001600160a01b0385166024820152909150829060440160408051601f19818403018152918152602080830180516001600160e01b0316634274debf60e11b17905290516109a793929101611d05565b604051602081830303815290604052816000815181106109c9576109c9611ca5565b602002602001018190525092915050565b600160205281600052604060002081600881106109f657600080fd5b01546001600160a01b03169150829050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bf9190611cec565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190611d29565b6001600160a01b0316336001600160a01b031614610b245760405162461bcd60e51b8152600401610b1b90611d46565b60405180910390fd5b8251825181148015610b365750815181145b610b6c5760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610ca357610ba3858281518110610b8c57610b8c611ca5565b60200260200101516001600160a01b03163b151590565b610bbf5760405162461bcd60e51b8152600401610b1b90611d7d565b610bd4838281518110610b8c57610b8c611ca5565b610bf05760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610c0257610c02611ca5565b602002602001015160016000878481518110610c2057610c20611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020858381518110610c5a57610c5a611ca5565b602002602001015160088110610c7257610c72611ca5565b0180546001600160a01b0319166001600160a01b039290921691909117905580610c9b81611cd1565b915050610b6f565b5050505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1f9190611d29565b6001600160a01b0316336001600160a01b031614610d4f5760405162461bcd60e51b8152600401610b1b90611d46565b6001600160a01b0381163b610d765760405162461bcd60e51b8152600401610b1b90611d7d565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611d29565b6001600160a01b0316336001600160a01b031614610e3d5760405162461bcd60e51b8152600401610b1b90611d46565b815181518114610e795760405162461bcd60e51b8152602060048201526007602482015266042d8cadccee8d60cb1b6044820152606401610b1b565b60005b81811015610f2457610e99848281518110610b8c57610b8c611ca5565b610eb55760405162461bcd60e51b8152600401610b1b90611d7d565b828181518110610ec757610ec7611ca5565b602002602001015160026000868481518110610ee557610ee5611ca5565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610f1c90611cd1565b915050610e7c565b50505050565b60606106bc85610f398561055c565b600081518110610f4b57610f4b611ca5565b60200260200101518685611264565b60408051600380825260808201909252606091816020015b6060815260200190600190039081610f72575050604080516001600160a01b038616602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929350610fe192879201611d05565b6040516020818303038152906040528160008151811061100357611003611ca5565b602090810291909101810191909152604080516001600160a01b03861660248201526044808201869052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516110669287929101611d05565b6040516020818303038152906040528160018151811061108857611088611ca5565b6020908102919091010152604051602481018390526001600160a01b038616604482015260016064820152839060840160408051601f19818403018152918152602080830180516001600160e01b03166383df674760e01b17905290516110f193929101611d05565b6040516020818303038152906040528160028151811061090857610908611ca5565b60008061112186868661091b565b9092111595945050505050565b60408051600180825281830190925260609160208083019080368337019050509050826001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190611d29565b816000815181106111c5576111c5611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916106bf9160009182918691908216906370a0823190602401602060405180830381865afa158015611240573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039e9190611cec565b606081156106bf57600073a5e0829caced8ffdd4de3c43696c57f7d7a678ff63d06ca61f846112938888611528565b6040518363ffffffff1660e01b81526004016112b0929190611da2565b600060405180830381865afa1580156112cd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112f59190810190611dbb565b9050600081600183516113089190611e4c565b8151811061131857611318611ca5565b6020026020010151111561151f576040805160038082526080820190925290816020015b606081526020019060019003908161133c5750506040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b17905291519294506113b692889201611d05565b604051602081830303815290604052826000815181106113d8576113d8611ca5565b6020908102919091018101919091526040805173a5e0829caced8ffdd4de3c43696c57f7d7a678ff60248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b17905290516114469288929101611d05565b6040516020818303038152906040528260018151811061146857611468611ca5565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff806338ed173985600061149b8a8a611528565b8b6000196040516024016114b3959493929190611e63565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506040516020016114f1929190611d05565b6040516020818303038152906040528260028151811061151357611513611ca5565b60200260200101819052505b50949350505050565b60606001600160a01b038216730d500b1d8e8ef31e21c99d1db9a6444d3adf127014156115f0576040805160028082526060820183529091602083019080368337019050509050828160008151811061158357611583611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf1270816001815181106115cb576115cb611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050610464565b6001600160a01b038316730d500b1d8e8ef31e21c99d1db9a6444d3adf12701415611691576040805160028082526060820183529091602083019080368337019050509050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160008151811061165d5761165d611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816001815181106115cb576115cb611ca5565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106116c6576116c6611ca5565b60200260200101906001600160a01b031690816001600160a01b031681525050730d500b1d8e8ef31e21c99d1db9a6444d3adf12708160018151811061170e5761170e611ca5565b60200260200101906001600160a01b031690816001600160a01b03168152505081816002815181106111c5576111c5611ca5565b6001600160a01b038116811461175757600080fd5b50565b60006020828403121561176c57600080fd5b813561035381611742565b600081518084526020808501945080840160005b838110156117b05781516001600160a01b03168752958201959082019060010161178b565b509495945050505050565b6020815260006103536020830184611777565b600080600080608085870312156117e457600080fd5b84356117ef81611742565b935060208501356117ff81611742565b9250604085013561180f81611742565b9150606085013561181f81611742565b939692955090935050565b6000815180845260005b8181101561185057602081850181015186830182015201611834565b81811115611862576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156118cc57603f198886030184526118ba85835161182a565b9450928501929085019060010161189e565b5092979650505050505050565b6000806000606084860312156118ee57600080fd5b83356118f981611742565b9250602084013561190981611742565b9150604084013561191981611742565b809150509250925092565b600080600080600060a0868803121561193c57600080fd5b853561194781611742565b9450602086013561195781611742565b9350604086013561196781611742565b9250606086013561197781611742565b949793965091946080013592915050565b6000806040838503121561199b57600080fd5b82356119a681611742565b915060208301356119b681611742565b809150509250929050565b600080600080608085870312156119d757600080fd5b84356119e281611742565b935060208501356119f281611742565b92506040850135611a0281611742565b9396929550929360600135925050565b60008060408385031215611a2557600080fd5b8235611a3081611742565b946020939093013593505050565b600080600060608486031215611a5357600080fd5b8335611a5e81611742565b92506020840135611a6e81611742565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611abe57611abe611a7f565b604052919050565b600067ffffffffffffffff821115611ae057611ae0611a7f565b5060051b60200190565b600082601f830112611afb57600080fd5b81356020611b10611b0b83611ac6565b611a95565b82815260059290921b84018101918181019086841115611b2f57600080fd5b8286015b84811015611b53578035611b4681611742565b8352918301918301611b33565b509695505050505050565b600082601f830112611b6f57600080fd5b81356020611b7f611b0b83611ac6565b82815260059290921b84018101918181019086841115611b9e57600080fd5b8286015b84811015611b535780358352918301918301611ba2565b600080600060608486031215611bce57600080fd5b833567ffffffffffffffff80821115611be657600080fd5b611bf287838801611aea565b94506020860135915080821115611c0857600080fd5b611c1487838801611b5e565b93506040860135915080821115611c2a57600080fd5b50611c3786828701611aea565b9150509250925092565b60008060408385031215611c5457600080fd5b823567ffffffffffffffff80821115611c6c57600080fd5b611c7886838701611aea565b93506020850135915080821115611c8e57600080fd5b50611c9b85828601611b5e565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ce557611ce5611cbb565b5060010190565b600060208284031215611cfe57600080fd5b5051919050565b6001600160a01b03831681526040602082018190526000906106bf9083018461182a565b600060208284031215611d3b57600080fd5b815161035381611742565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b8281526040602082015260006106bf6040830184611777565b60006020808385031215611dce57600080fd5b825167ffffffffffffffff811115611de557600080fd5b8301601f81018513611df657600080fd5b8051611e04611b0b82611ac6565b81815260059190911b82018301908381019087831115611e2357600080fd5b928401925b82841015611e4157835182529284019290840190611e28565b979650505050505050565b600082821015611e5e57611e5e611cbb565b500390565b85815284602082015260a060408201526000611e8260a0830186611777565b6001600160a01b039490941660608301525060800152939250505056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/CurveStableSwapAdapter.json b/deployments/polygon/CurveStableSwapAdapter.json new file mode 100644 index 000000000..7c7292151 --- /dev/null +++ b/deployments/polygon/CurveStableSwapAdapter.json @@ -0,0 +1,983 @@ +{ + "address": "0xfe28e4C3403dE2a3680d113De1E3CB4Ec716b58e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBTC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aBTCPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "aPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "calcWithdrawOneCoinNotSame", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_underlyingTokenAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "coins", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "noZeroAllowanceAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renBTC", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_calcWithdrawOneCoinNotSame", + "type": "bool[]" + } + ], + "name": "setCalcWithdrawOneCoinNotSame", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_noZeroAllowanceAllowed", + "type": "bool[]" + } + ], + "name": "setNoZeroAllowanceAllowed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "int128[]", + "name": "_indexes", + "type": "int128[]" + } + ], + "name": "setTokenIndexes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenIndexes", + "outputs": [ + { + "internalType": "int128", + "name": "", + "type": "int128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "underlyingCoins", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xca9a479d4dc154611f0293aaa377c0417ee883537b33207b8583bc43abcbd196", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xfe28e4C3403dE2a3680d113De1E3CB4Ec716b58e", + "transactionIndex": 14, + "gasUsed": "2958877", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0xf67979326af91d8d1e71a72c07949bfc638c616e4b6ab0834c9407fbfc33565c", + "transactionHash": "0xca9a479d4dc154611f0293aaa377c0417ee883537b33207b8583bc43abcbd196", + "logs": [ + { + "transactionIndex": 14, + "blockNumber": 26876051, + "transactionHash": "0xca9a479d4dc154611f0293aaa377c0417ee883537b33207b8583bc43abcbd196", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x000000000000000000000000000000000000000000000000020d9a25cb407bb20000000000000000000000000000000000000000000000003246cf749b9c24000000000000000000000000000000000000000000000005a5a60021cbb6d77fc60000000000000000000000000000000000000000000000003039354ed05ba84e0000000000000000000000000000000000000000000005a5a80dbbf18217fb78", + "logIndex": 47, + "blockHash": "0xf67979326af91d8d1e71a72c07949bfc638c616e4b6ab0834c9407fbfc33565c" + } + ], + "blockNumber": 26876051, + "cumulativeGasUsed": "4372924", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x60806040523480156200001157600080fd5b506040516200325938038062003259833981016040819052620000349162000310565b600080546127106001908155600160a01b6001600160a81b03199092166001600160a01b0394909416939093171781557f545a5828ad9cfa94b1985f76572c241942ef8c96c20055464d2a886269db219280546001600160801b03199081169091557fd39204ae963dbdb29c8a7e4ae272e7a25435f88868693ae051bffc92ffe3c65580548216841790557f7d83540524facb2e4471952a8e70ccc214b6dbaa4312d25948e858db32f3c59180546002908316811790915560037f1c0091c5c8a33663b85f7cf7ede7900c37c1b4b840fc29568d3b0a49b807ac99557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606c80546001600160a01b0319908116738f3cf7ad23cd3cadbd9735aff958023239c6a063179091557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606d80548216732791bca1f2de4661ed88a30c99a7a9449aa841741790557f44a04fd2c13a041eea89befc6d17a4ff37aa1aa28e511c88f929dcc1433b606e8054821673c2132d05d31c914a87c6611c10748aeb04b58e8f1790557f576ab61c2c940e11403b3f907068ed7eb48a4debaac990182c5420c494ef4e008054841690557ff74137c0900ab93eed3bf7ddd12fe2a27d9f746ad1b81a6348d590579e9f5bac805490931690941790915573c2d95eef97ec6c17551d45e77b590dc1f9117c679091527f54b003e60a6a993960fbaa2cd19887526ff2871e49f0ed4b0ceecdd4418124e3557f976e228f930d23f832de6c160bb04b73b1a79f404246a7158d43edeb1533e0338054821673dbf31df14b66535af65aac99c32e9ea844e1450190811790915560076020527f29bb1356bc197d819e4a0cee886e87997c2d3bc5036fa78f91500ac79d5208f480548316731bfd67037b42cf73acf2047067bd4f2c47d9bfd61790557f29bb1356bc197d819e4a0cee886e87997c2d3bc5036fa78f91500ac79d5208f5805490921617905562000342565b6000602082840312156200032357600080fd5b81516001600160a01b03811681146200033b57600080fd5b9392505050565b612f0780620003526000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638ea3b34a11610146578063df935722116100c3578063ee665bed11610087578063ee665bed146105d8578063ef856be9146105eb578063f1aacbb71461060b578063f44941711461061e578063f49307ca14610641578063fc4773431461065457600080fd5b8063df93572214610561578063e0bab4c414610574578063e13e18521461058f578063e49d5ecc146105aa578063e595cbb6146105bd57600080fd5b8063c42fa7f41161010a578063c42fa7f4146104ed578063c54e44eb14610500578063d64410461461051b578063d74baaf81461053b578063da699f961461054e57600080fd5b80638ea3b34a1461048e57806390e61605146104a1578063919b69d7146104b4578063a6016c94146104c7578063a91ee0dc146104da57600080fd5b80634dede3de116101d457806364dd5f801161019857806364dd5f801461042c578063770788721461043f5780637c47b3f41461044d57806385541e441461046057806389a302711461047357600080fd5b80634dede3de146103a35780634f83b52d146103be5780635bd83d1c146103de5780635fbc1031146103fe578063609257791461041957600080fd5b80632af06b961161021b5780632af06b96146103285780632de778381461034957806336d8bf931461035c578063489b5295146103705780634ad36e021461039057600080fd5b8063191c194b146102585780631b6486d6146102745780631c9f99e4146102b55780632390db2d146102ca57806328c1f99b146102fd575b600080fd5b61026160015481565b6040519081526020015b60405180910390f35b6102a26102823660046125f0565b6004602090815260009283526040808420909152908252902054600f0b81565b604051600f9190910b815260200161026b565b6102c86102c3366004612708565b610667565b005b6102ed6102d83660046127f6565b60096020526000908152604090205460ff1681565b604051901515815260200161026b565b600054610310906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b60005461033c90600160a01b900460ff1681565b60405161026b9190612829565b6102616103573660046125f0565b61089f565b6102ed61036a3660046127f6565b50600090565b61038361037e366004612851565b61099c565b60405161026b91906128e9565b61026161039e36600461294b565b610a20565b610310731bfd67037b42cf73acf2047067bd4f2c47d9bfd681565b6102616103cc3660046127f6565b60036020526000908152604090205481565b6102616103ec3660046127f6565b60056020526000908152604090205481565b61031073dbf31df14b66535af65aac99c32e9ea844e1450181565b61038361042736600461294b565b610a6c565b61026161043a366004612851565b610ca0565b61031061036a3660046127f6565b6102c861045b36600461299c565b610cb2565b61026161046e3660046129bd565b610dcd565b610310732791bca1f2de4661ed88a30c99a7a9449aa8417481565b61031061049c3660046129fe565b611060565b6102616104af366004612851565b61108e565b6102c86104c23660046129fe565b611107565b6102c86104d5366004612a2a565b61121c565b6102c86104e83660046127f6565b611399565b6103106104fb3660046129fe565b611487565b61031073c2132d05d31c914a87c6611c10748aeb04b58e8f81565b6102616105293660046127f6565b60026020526000908152604090205481565b6103106105493660046125f0565b6114a3565b6102c861055c366004612af4565b611507565b61038361056f36600461294b565b6115e1565b610310738f3cf7ad23cd3cadbd9735aff958023239c6a06381565b61031073c2d95eef97ec6c17551d45e77b590dc1f9117c6781565b6102ed6105b836600461294b565b6115f7565b61031073445fe580ef8d70ff569ab36e80c647af338db35181565b6102616105e63660046129bd565b611612565b6105fe6105f93660046125f0565b61176f565b60405161026b9190612b0d565b6102c86106193660046129bd565b61188b565b6102ed61062c3660046127f6565b60086020526000908152604090205460ff1681565b61038361064f366004612851565b6119a1565b6102c8610662366004612a2a565b6119b4565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106dc9190612b5a565b6001600160a01b0316336001600160a01b0316146107155760405162461bcd60e51b815260040161070c90612b77565b60405180910390fd5b82518251811480156107275750815181145b6107435760405162461bcd60e51b815260040161070c90612bae565b60005b818110156108985761077a85828151811061076357610763612bcf565b60200260200101516001600160a01b03163b151590565b6107965760405162461bcd60e51b815260040161070c90612be5565b6107ab84828151811061076357610763612bcf565b6107c75760405162461bcd60e51b815260040161070c90612be5565b8281815181106107d9576107d9612bcf565b6020026020010151600460008784815181106107f7576107f7612bcf565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600086848151811061083357610833612bcf565b6020908102919091018101516001600160a01b0316825281019190915260400160002080546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff929092169190911790558061089081612c20565b915050610746565b5050505050565b600080836001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190612c3b565b9050600061091185611afa565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190612c3b565b9050670de0b6b3a76400006109878284612c54565b6109919190612c73565b925050505b92915050565b6040516370a0823160e01b81526001600160a01b038481166004830152606091610a1691859185918316906370a0823190602401602060405180830381865afa1580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190612c3b565b611b5e565b90505b9392505050565b600080610a2e86868661108e565b90506000610a3d878787610ca0565b905080610a4a8584612c54565b610a549190612c73565b610a5f906001612c95565b925050505b949350505050565b60608115610a64576000610a816000856114a3565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610a99575050604080516001600160a01b038716602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929450610b0892849201612cad565b60405160208183030381529060405282600081518110610b2a57610b2a612bcf565b602090810291909101810191909152604080516001600160a01b03871660248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b1790529051610b8d9284929101612cad565b60405160208183030381529060405282600181518110610baf57610baf612bcf565b6020908102919091018101919091526001600160a01b03808616600090815260048352604080822092891682529190925290205484908490600f0b6064610bf7898585611612565b610c0290605f612c54565b610c0c9190612c73565b6040516024810193909352600f9190910b604483015260648201526001608482015260a40160408051601f19818403018152918152602080830180516001600160e01b031663517a55a360e01b1790529051610c6a93929101612cad565b60405160208183030381529060405282600281518110610c8c57610c8c612bcf565b602002602001018190525050949350505050565b6000610a1683836105e687878761108e565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d279190612b5a565b6001600160a01b0316336001600160a01b031614610d575760405162461bcd60e51b815260040161070c90612cd1565b6000805482919060ff60a01b1916600160a01b836001811115610d7c57610d7c612813565b02179055506000543390600160a01b900460ff166001811115610da157610da1612813565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b60008115611056576001600160a01b038316600090815260056020908152604080832054600790925280832081516101008101928390529293929160089082845b81546001600160a01b03168152600190910190602001808311610e0e575050505050905060008267ffffffffffffffff811115610e4d57610e4d612629565b604051908082528060200260200182016040528015610e76578160200160208202803683370190505b50905060005b83811015610ee657876001600160a01b0316838260088110610ea057610ea0612bcf565b60200201516001600160a01b03161415610ed45785828281518110610ec757610ec7612bcf565b6020026020010181815250505b80610ede81612c20565b915050610e7c565b508260021415610fb257856001600160a01b031663ed8e84f3604051806040016040528084600081518110610f1d57610f1d612bcf565b6020026020010151815260200184600181518110610f3d57610f3d612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d2b565b602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190612c3b565b9350505050610a19565b826003141561105257856001600160a01b0316633883e119604051806060016040528084600081518110610fe857610fe8612bcf565b602002602001015181526020018460018151811061100857611008612bcf565b602002602001015181526020018460028151811061102857611028612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d6b565b5050505b5060009392505050565b6007602052816000526040600020816008811061107c57600080fd5b01546001600160a01b03169150829050565b600061109b6000836114a3565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612c3b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117c9190612b5a565b6001600160a01b0316336001600160a01b0316146111ac5760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0382163b6111d35760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190612b5a565b6001600160a01b0316336001600160a01b0316146112c15760405162461bcd60e51b815260040161070c90612b77565b8151815181146112e35760405162461bcd60e51b815260040161070c90612bae565b60005b818110156113935761130384828151811061076357610763612bcf565b61131f5760405162461bcd60e51b815260040161070c90612be5565b82818151811061133157611331612bcf565b60200260200101516008600086848151811061134f5761134f612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061138b81612c20565b9150506112e6565b50505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612b5a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b815260040161070c90612b77565b6001600160a01b0381163b6114655760405162461bcd60e51b815260040161070c90612be5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6006602052816000526040600020816008811061107c57600080fd5b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190612b5a565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157c9190612b5a565b6001600160a01b0316336001600160a01b0316146115ac5760405162461bcd60e51b815260040161070c90612cd1565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606115ee848484611b5e565b95945050505050565b600080611605868686610ca0565b9092111595945050505050565b60008115611056576001600160a01b03831660009081526009602052604090205460ff166116d0576001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163cc2b27d760e01b8152908101859052600f9290920b60248301529063cc2b27d790604401602060405180830381865afa1580156116a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cb9190612c3b565b611768565b6001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163314ca9dd60e21b8152908101859052600f9290920b6024830152600160448301529063c532a77490606401602060405180830381865afa158015611744573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117689190612c3b565b9050610a19565b6001600160a01b03821660009081526007602052604080822081516101008101928390526060939290919060089082845b81546001600160a01b031681526001909101906020018083116117a0575050506001600160a01b0387166000908152600560205260409020549293508291505067ffffffffffffffff8111156117f8576117f8612629565b604051908082528060200260200182016040528015611821578160200160208202803683370190505b50925060005b818110156118825782816008811061184157611841612bcf565b602002015184828151811061185857611858612bcf565b6001600160a01b03909216602092830291909101909101528061187a81612c20565b915050611827565b50505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190612b5a565b6001600160a01b0316336001600160a01b0316146119305760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0383163b6119575760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03831660009081526002602052604080822083905551339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b6060610a1684848461042788888861108e565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612b5a565b6001600160a01b0316336001600160a01b031614611a595760405162461bcd60e51b815260040161070c90612b77565b815181518114611a7b5760405162461bcd60e51b815260040161070c90612bae565b60005b8181101561139357828181518110611a9857611a98612bcf565b602002602001015160096000868481518110611ab657611ab6612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611af281612c20565b915050611a7e565b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190612b5a565b6060600080600080611b718888886121d9565b935093509350935060018111156121ce578067ffffffffffffffff811115611b9b57611b9b612629565b604051908082528060200260200182016040528015611bce57816020015b6060815260200190600190039081611bb95790505b5094506000805b85811015611ee7576000848281518110611bf157611bf1612bcf565b60200260200101511115611ed55760086000868360088110611c1557611c15612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff1615611d2f57848160088110611c5157611c51612bcf565b6020020151858260088110611c6857611c68612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611c8e57611c8e612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611cf2929190612cad565b604051602081830303815290604052878380611d0d90612c20565b945081518110611d1f57611d1f612bcf565b6020026020010181905250611ed5565b848160088110611d4157611d41612bcf565b6020020151858260088110611d5857611d58612bcf565b5050604080516001600160a01b038c16602482015260006044808301919091528251808303909101815260649091018252602081810180516001600160e01b031663095ea7b360e01b1790529151611db1939201612cad565b604051602081830303815290604052878380611dcc90612c20565b945081518110611dde57611dde612bcf565b6020026020010181905250848160088110611dfb57611dfb612bcf565b6020020151858260088110611e1257611e12612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611e3857611e38612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611e9c929190612cad565b604051602081830303815290604052878380611eb790612c20565b945081518110611ec957611ec9612bcf565b60200260200101819052505b80611edf81612c20565b915050611bd5565b50600285141561204c576000604051806040016040528085600081518110611f1157611f11612bcf565b6020026020010151815260200185600181518110611f3157611f31612bcf565b60200260200101518152509050600060648a6001600160a01b031663ed8e84f38460016040518363ffffffff1660e01b8152600401611f71929190612d2b565b602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612c3b565b611fbd90605f612c54565b611fc79190612c73565b90508982826001604051602401611fe093929190612d88565b60408051601f19818403018152918152602080830180516001600160e01b031663ee22be2360e01b179052905161201993929101612cad565b60405160208183030381529060405288848151811061203a5761203a612bcf565b602002602001018190525050506121cc565b60038514156121cc57600060405180606001604052808560008151811061207557612075612bcf565b602002602001015181526020018560018151811061209557612095612bcf565b60200260200101518152602001856002815181106120b5576120b5612bcf565b60200260200101518152509050600060648a6001600160a01b0316633883e1198460016040518363ffffffff1660e01b81526004016120f5929190612d6b565b602060405180830381865afa158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190612c3b565b61214190605f612c54565b61214b9190612c73565b9050898282600160405160240161216493929190612dac565b60408051601f19818403018152918152602080830180516001600160e01b03166315b74c9d60e11b179052905161219d93929101612cad565b6040516020818303038152906040528884815181106121be576121be612bcf565b602002602001018190525050505b505b505050509392505050565b60006121e36125b9565b6001600160a01b03841660009081526005602090815260408083205460079092528083208151610100810192839052929550606093929160089082845b81546001600160a01b0316815260019091019060200180831161222057505050505092508367ffffffffffffffff81111561225d5761225d612629565b604051908082528060200260200182016040528015612286578160200160208202803683370190505b50915060005b8481101561237957876001600160a01b03168482600881106122b0576122b0612bcf565b60200201516001600160a01b03161415612367576122d98789886122d48b8d61089f565b612383565b8382815181106122eb576122eb612bcf565b602002602001018181525050600083828151811061230b5761230b612bcf565b60200260200101511115612367576008600085836008811061232f5761232f612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156123625760029150612367565b600391505b8061237181612c20565b91505061228c565b5093509350935093565b60006001600054600160a01b900460ff1660018111156123a5576123a5612813565b146123ba576123b58585856123c6565b6115ee565b6115ee85858585612486565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242b9190612dd0565b60ff169050600061243d826012612df3565b61244890600a612eee565b6001600160a01b03871660009081526002602052604090205461246b9190612c73565b905080841161247a578361247c565b805b9695505050505050565b60008060036000876001600160a01b03166001600160a01b031681526020019081526020016000205490506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190612dd0565b60ff1690506000612527826012612df3565b61253290600a612eee565b61253c9087612c54565b905060008315612562576127106125538588612c54565b61255d9190612c73565b61257d565b612710600154876125739190612c54565b61257d9190612c73565b905080821161258c57866125ac565b612597836012612df3565b6125a290600a612eee565b6125ac9082612c73565b9998505050505050505050565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b03811681146125ed57600080fd5b50565b6000806040838503121561260357600080fd5b823561260e816125d8565b9150602083013561261e816125d8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561266857612668612629565b604052919050565b600067ffffffffffffffff82111561268a5761268a612629565b5060051b60200190565b600082601f8301126126a557600080fd5b813560206126ba6126b583612670565b61263f565b82815260059290921b840181019181810190868411156126d957600080fd5b8286015b848110156126fd5780356126f0816125d8565b83529183019183016126dd565b509695505050505050565b60008060006060848603121561271d57600080fd5b833567ffffffffffffffff8082111561273557600080fd5b61274187838801612694565b945060209150818601358181111561275857600080fd5b61276488828901612694565b94505060408601358181111561277957600080fd5b86019050601f8101871361278c57600080fd5b803561279a6126b582612670565b81815260059190911b820183019083810190898311156127b957600080fd5b928401925b828410156127e757833580600f0b81146127d85760008081fd5b825292840192908401906127be565b80955050505050509250925092565b60006020828403121561280857600080fd5b8135610a19816125d8565b634e487b7160e01b600052602160045260246000fd5b602081016002831061284b57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561286657600080fd5b8335612871816125d8565b92506020840135612881816125d8565b91506040840135612891816125d8565b809150509250925092565b6000815180845260005b818110156128c2576020818501810151868301820152016128a6565b818111156128d4576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561293e57603f1988860301845261292c85835161289c565b94509285019290850190600101612910565b5092979650505050505050565b6000806000806080858703121561296157600080fd5b843561296c816125d8565b9350602085013561297c816125d8565b9250604085013561298c816125d8565b9396929550929360600135925050565b6000602082840312156129ae57600080fd5b813560028110610a1957600080fd5b6000806000606084860312156129d257600080fd5b83356129dd816125d8565b925060208401356129ed816125d8565b929592945050506040919091013590565b60008060408385031215612a1157600080fd5b8235612a1c816125d8565b946020939093013593505050565b60008060408385031215612a3d57600080fd5b823567ffffffffffffffff80821115612a5557600080fd5b612a6186838701612694565b9350602091508185013581811115612a7857600080fd5b85019050601f81018613612a8b57600080fd5b8035612a996126b582612670565b81815260059190911b82018301908381019088831115612ab857600080fd5b928401925b82841015612ae55783358015158114612ad65760008081fd5b82529284019290840190612abd565b80955050505050509250929050565b600060208284031215612b0657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b4e5783516001600160a01b031683529284019291840191600101612b29565b50909695505050505050565b600060208284031215612b6c57600080fd5b8151610a19816125d8565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b602080825260079082015266042d8cadccee8d60cb1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612c3457612c34612c0a565b5060010190565b600060208284031215612c4d57600080fd5b5051919050565b6000816000190483118215151615612c6e57612c6e612c0a565b500290565b600082612c9057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ca857612ca8612c0a565b500190565b6001600160a01b0383168152604060208201819052600090610a169083018461289c565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b8060005b6002811015611393578151845260209384019390910190600101612d0c565b60608101612d398285612d08565b82151560408301529392505050565b8060005b6003811015611393578151845260209384019390910190600101612d4c565b60808101612d798285612d48565b82151560608301529392505050565b60808101612d968286612d08565b8360408301528215156060830152949350505050565b60a08101612dba8286612d48565b8360608301528215156080830152949350505050565b600060208284031215612de257600080fd5b815160ff81168114610a1957600080fd5b600082821015612e0557612e05612c0a565b500390565b600181815b80851115612e45578160001904821115612e2b57612e2b612c0a565b80851615612e3857918102915b93841c9390800290612e0f565b509250929050565b600082612e5c57506001610996565b81612e6957506000610996565b8160018114612e7f5760028114612e8957612ea5565b6001915050610996565b60ff841115612e9a57612e9a612c0a565b50506001821b610996565b5060208310610133831016604e8410600b8410161715612ec8575081810a610996565b612ed28383612e0a565b8060001904821115612ee657612ee6612c0a565b029392505050565b6000610a198383612e4d56fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102535760003560e01c80638ea3b34a11610146578063df935722116100c3578063ee665bed11610087578063ee665bed146105d8578063ef856be9146105eb578063f1aacbb71461060b578063f44941711461061e578063f49307ca14610641578063fc4773431461065457600080fd5b8063df93572214610561578063e0bab4c414610574578063e13e18521461058f578063e49d5ecc146105aa578063e595cbb6146105bd57600080fd5b8063c42fa7f41161010a578063c42fa7f4146104ed578063c54e44eb14610500578063d64410461461051b578063d74baaf81461053b578063da699f961461054e57600080fd5b80638ea3b34a1461048e57806390e61605146104a1578063919b69d7146104b4578063a6016c94146104c7578063a91ee0dc146104da57600080fd5b80634dede3de116101d457806364dd5f801161019857806364dd5f801461042c578063770788721461043f5780637c47b3f41461044d57806385541e441461046057806389a302711461047357600080fd5b80634dede3de146103a35780634f83b52d146103be5780635bd83d1c146103de5780635fbc1031146103fe578063609257791461041957600080fd5b80632af06b961161021b5780632af06b96146103285780632de778381461034957806336d8bf931461035c578063489b5295146103705780634ad36e021461039057600080fd5b8063191c194b146102585780631b6486d6146102745780631c9f99e4146102b55780632390db2d146102ca57806328c1f99b146102fd575b600080fd5b61026160015481565b6040519081526020015b60405180910390f35b6102a26102823660046125f0565b6004602090815260009283526040808420909152908252902054600f0b81565b604051600f9190910b815260200161026b565b6102c86102c3366004612708565b610667565b005b6102ed6102d83660046127f6565b60096020526000908152604090205460ff1681565b604051901515815260200161026b565b600054610310906001600160a01b031681565b6040516001600160a01b03909116815260200161026b565b60005461033c90600160a01b900460ff1681565b60405161026b9190612829565b6102616103573660046125f0565b61089f565b6102ed61036a3660046127f6565b50600090565b61038361037e366004612851565b61099c565b60405161026b91906128e9565b61026161039e36600461294b565b610a20565b610310731bfd67037b42cf73acf2047067bd4f2c47d9bfd681565b6102616103cc3660046127f6565b60036020526000908152604090205481565b6102616103ec3660046127f6565b60056020526000908152604090205481565b61031073dbf31df14b66535af65aac99c32e9ea844e1450181565b61038361042736600461294b565b610a6c565b61026161043a366004612851565b610ca0565b61031061036a3660046127f6565b6102c861045b36600461299c565b610cb2565b61026161046e3660046129bd565b610dcd565b610310732791bca1f2de4661ed88a30c99a7a9449aa8417481565b61031061049c3660046129fe565b611060565b6102616104af366004612851565b61108e565b6102c86104c23660046129fe565b611107565b6102c86104d5366004612a2a565b61121c565b6102c86104e83660046127f6565b611399565b6103106104fb3660046129fe565b611487565b61031073c2132d05d31c914a87c6611c10748aeb04b58e8f81565b6102616105293660046127f6565b60026020526000908152604090205481565b6103106105493660046125f0565b6114a3565b6102c861055c366004612af4565b611507565b61038361056f36600461294b565b6115e1565b610310738f3cf7ad23cd3cadbd9735aff958023239c6a06381565b61031073c2d95eef97ec6c17551d45e77b590dc1f9117c6781565b6102ed6105b836600461294b565b6115f7565b61031073445fe580ef8d70ff569ab36e80c647af338db35181565b6102616105e63660046129bd565b611612565b6105fe6105f93660046125f0565b61176f565b60405161026b9190612b0d565b6102c86106193660046129bd565b61188b565b6102ed61062c3660046127f6565b60086020526000908152604090205460ff1681565b61038361064f366004612851565b6119a1565b6102c8610662366004612a2a565b6119b4565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106dc9190612b5a565b6001600160a01b0316336001600160a01b0316146107155760405162461bcd60e51b815260040161070c90612b77565b60405180910390fd5b82518251811480156107275750815181145b6107435760405162461bcd60e51b815260040161070c90612bae565b60005b818110156108985761077a85828151811061076357610763612bcf565b60200260200101516001600160a01b03163b151590565b6107965760405162461bcd60e51b815260040161070c90612be5565b6107ab84828151811061076357610763612bcf565b6107c75760405162461bcd60e51b815260040161070c90612be5565b8281815181106107d9576107d9612bcf565b6020026020010151600460008784815181106107f7576107f7612bcf565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600086848151811061083357610833612bcf565b6020908102919091018101516001600160a01b0316825281019190915260400160002080546fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff929092169190911790558061089081612c20565b915050610746565b5050505050565b600080836001600160a01b031663bb7b8b806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190612c3b565b9050600061091185611afa565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190612c3b565b9050670de0b6b3a76400006109878284612c54565b6109919190612c73565b925050505b92915050565b6040516370a0823160e01b81526001600160a01b038481166004830152606091610a1691859185918316906370a0823190602401602060405180830381865afa1580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a119190612c3b565b611b5e565b90505b9392505050565b600080610a2e86868661108e565b90506000610a3d878787610ca0565b905080610a4a8584612c54565b610a549190612c73565b610a5f906001612c95565b925050505b949350505050565b60608115610a64576000610a816000856114a3565b60408051600380825260808201909252919250816020015b6060815260200190600190039081610a99575050604080516001600160a01b038716602482015260006044808301919091528251808303909101815260649091018252602080820180516001600160e01b031663095ea7b360e01b1790529151929450610b0892849201612cad565b60405160208183030381529060405282600081518110610b2a57610b2a612bcf565b602090810291909101810191909152604080516001600160a01b03871660248201526044808201879052825180830390910181526064909101825280830180516001600160e01b031663095ea7b360e01b1790529051610b8d9284929101612cad565b60405160208183030381529060405282600181518110610baf57610baf612bcf565b6020908102919091018101919091526001600160a01b03808616600090815260048352604080822092891682529190925290205484908490600f0b6064610bf7898585611612565b610c0290605f612c54565b610c0c9190612c73565b6040516024810193909352600f9190910b604483015260648201526001608482015260a40160408051601f19818403018152918152602080830180516001600160e01b031663517a55a360e01b1790529051610c6a93929101612cad565b60405160208183030381529060405282600281518110610c8c57610c8c612bcf565b602002602001018190525050949350505050565b6000610a1683836105e687878761108e565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d279190612b5a565b6001600160a01b0316336001600160a01b031614610d575760405162461bcd60e51b815260040161070c90612cd1565b6000805482919060ff60a01b1916600160a01b836001811115610d7c57610d7c612813565b02179055506000543390600160a01b900460ff166001811115610da157610da1612813565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b60008115611056576001600160a01b038316600090815260056020908152604080832054600790925280832081516101008101928390529293929160089082845b81546001600160a01b03168152600190910190602001808311610e0e575050505050905060008267ffffffffffffffff811115610e4d57610e4d612629565b604051908082528060200260200182016040528015610e76578160200160208202803683370190505b50905060005b83811015610ee657876001600160a01b0316838260088110610ea057610ea0612bcf565b60200201516001600160a01b03161415610ed45785828281518110610ec757610ec7612bcf565b6020026020010181815250505b80610ede81612c20565b915050610e7c565b508260021415610fb257856001600160a01b031663ed8e84f3604051806040016040528084600081518110610f1d57610f1d612bcf565b6020026020010151815260200184600181518110610f3d57610f3d612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d2b565b602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190612c3b565b9350505050610a19565b826003141561105257856001600160a01b0316633883e119604051806060016040528084600081518110610fe857610fe8612bcf565b602002602001015181526020018460018151811061100857611008612bcf565b602002602001015181526020018460028151811061102857611028612bcf565b602002602001015181525060016040518363ffffffff1660e01b8152600401610f67929190612d6b565b5050505b5060009392505050565b6007602052816000526040600020816008811061107c57600080fd5b01546001600160a01b03169150829050565b600061109b6000836114a3565b6040516370a0823160e01b81526001600160a01b03868116600483015291909116906370a0823190602401602060405180830381865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612c3b565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117c9190612b5a565b6001600160a01b0316336001600160a01b0316146111ac5760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0382163b6111d35760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03821660009081526003602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190612b5a565b6001600160a01b0316336001600160a01b0316146112c15760405162461bcd60e51b815260040161070c90612b77565b8151815181146112e35760405162461bcd60e51b815260040161070c90612bae565b60005b818110156113935761130384828151811061076357610763612bcf565b61131f5760405162461bcd60e51b815260040161070c90612be5565b82818151811061133157611331612bcf565b60200260200101516008600086848151811061134f5761134f612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061138b81612c20565b9150506112e6565b50505050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190612b5a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b815260040161070c90612b77565b6001600160a01b0381163b6114655760405162461bcd60e51b815260040161070c90612be5565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6006602052816000526040600020816008811061107c57600080fd5b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190612b5a565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611558573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157c9190612b5a565b6001600160a01b0316336001600160a01b0316146115ac5760405162461bcd60e51b815260040161070c90612cd1565b6001819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b60606115ee848484611b5e565b95945050505050565b600080611605868686610ca0565b9092111595945050505050565b60008115611056576001600160a01b03831660009081526009602052604090205460ff166116d0576001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163cc2b27d760e01b8152908101859052600f9290920b60248301529063cc2b27d790604401602060405180830381865afa1580156116a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cb9190612c3b565b611768565b6001600160a01b038381166000818152600460208181526040808420958a1684529490529083902054925163314ca9dd60e21b8152908101859052600f9290920b6024830152600160448301529063c532a77490606401602060405180830381865afa158015611744573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117689190612c3b565b9050610a19565b6001600160a01b03821660009081526007602052604080822081516101008101928390526060939290919060089082845b81546001600160a01b031681526001909101906020018083116117a0575050506001600160a01b0387166000908152600560205260409020549293508291505067ffffffffffffffff8111156117f8576117f8612629565b604051908082528060200260200182016040528015611821578160200160208202803683370190505b50925060005b818110156118825782816008811061184157611841612bcf565b602002015184828151811061185857611858612bcf565b6001600160a01b03909216602092830291909101909101528061187a81612c20565b915050611827565b50505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119009190612b5a565b6001600160a01b0316336001600160a01b0316146119305760405162461bcd60e51b815260040161070c90612cd1565b6001600160a01b0383163b6119575760405162461bcd60e51b815260040161070c90612be5565b6001600160a01b03831660009081526002602052604080822083905551339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b6060610a1684848461042788888861108e565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a299190612b5a565b6001600160a01b0316336001600160a01b031614611a595760405162461bcd60e51b815260040161070c90612b77565b815181518114611a7b5760405162461bcd60e51b815260040161070c90612bae565b60005b8181101561139357828181518110611a9857611a98612bcf565b602002602001015160096000868481518110611ab657611ab6612bcf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611af281612c20565b915050611a7e565b6000816001600160a01b03166382c630666040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109969190612b5a565b6060600080600080611b718888886121d9565b935093509350935060018111156121ce578067ffffffffffffffff811115611b9b57611b9b612629565b604051908082528060200260200182016040528015611bce57816020015b6060815260200190600190039081611bb95790505b5094506000805b85811015611ee7576000848281518110611bf157611bf1612bcf565b60200260200101511115611ed55760086000868360088110611c1557611c15612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff1615611d2f57848160088110611c5157611c51612bcf565b6020020151858260088110611c6857611c68612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611c8e57611c8e612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611cf2929190612cad565b604051602081830303815290604052878380611d0d90612c20565b945081518110611d1f57611d1f612bcf565b6020026020010181905250611ed5565b848160088110611d4157611d41612bcf565b6020020151858260088110611d5857611d58612bcf565b5050604080516001600160a01b038c16602482015260006044808301919091528251808303909101815260649091018252602081810180516001600160e01b031663095ea7b360e01b1790529151611db1939201612cad565b604051602081830303815290604052878380611dcc90612c20565b945081518110611dde57611dde612bcf565b6020026020010181905250848160088110611dfb57611dfb612bcf565b6020020151858260088110611e1257611e12612bcf565b60200201516001600160a01b031663095ea7b38b878581518110611e3857611e38612bcf565b60209081029190910101516040516001600160a01b0390921660248301526044820152606401604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050604051602001611e9c929190612cad565b604051602081830303815290604052878380611eb790612c20565b945081518110611ec957611ec9612bcf565b60200260200101819052505b80611edf81612c20565b915050611bd5565b50600285141561204c576000604051806040016040528085600081518110611f1157611f11612bcf565b6020026020010151815260200185600181518110611f3157611f31612bcf565b60200260200101518152509050600060648a6001600160a01b031663ed8e84f38460016040518363ffffffff1660e01b8152600401611f71929190612d2b565b602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612c3b565b611fbd90605f612c54565b611fc79190612c73565b90508982826001604051602401611fe093929190612d88565b60408051601f19818403018152918152602080830180516001600160e01b031663ee22be2360e01b179052905161201993929101612cad565b60405160208183030381529060405288848151811061203a5761203a612bcf565b602002602001018190525050506121cc565b60038514156121cc57600060405180606001604052808560008151811061207557612075612bcf565b602002602001015181526020018560018151811061209557612095612bcf565b60200260200101518152602001856002815181106120b5576120b5612bcf565b60200260200101518152509050600060648a6001600160a01b0316633883e1198460016040518363ffffffff1660e01b81526004016120f5929190612d6b565b602060405180830381865afa158015612112573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121369190612c3b565b61214190605f612c54565b61214b9190612c73565b9050898282600160405160240161216493929190612dac565b60408051601f19818403018152918152602080830180516001600160e01b03166315b74c9d60e11b179052905161219d93929101612cad565b6040516020818303038152906040528884815181106121be576121be612bcf565b602002602001018190525050505b505b505050509392505050565b60006121e36125b9565b6001600160a01b03841660009081526005602090815260408083205460079092528083208151610100810192839052929550606093929160089082845b81546001600160a01b0316815260019091019060200180831161222057505050505092508367ffffffffffffffff81111561225d5761225d612629565b604051908082528060200260200182016040528015612286578160200160208202803683370190505b50915060005b8481101561237957876001600160a01b03168482600881106122b0576122b0612bcf565b60200201516001600160a01b03161415612367576122d98789886122d48b8d61089f565b612383565b8382815181106122eb576122eb612bcf565b602002602001018181525050600083828151811061230b5761230b612bcf565b60200260200101511115612367576008600085836008811061232f5761232f612bcf565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156123625760029150612367565b600391505b8061237181612c20565b91505061228c565b5093509350935093565b60006001600054600160a01b900460ff1660018111156123a5576123a5612813565b146123ba576123b58585856123c6565b6115ee565b6115ee85858585612486565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061242b9190612dd0565b60ff169050600061243d826012612df3565b61244890600a612eee565b6001600160a01b03871660009081526002602052604090205461246b9190612c73565b905080841161247a578361247c565b805b9695505050505050565b60008060036000876001600160a01b03166001600160a01b031681526020019081526020016000205490506000856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190612dd0565b60ff1690506000612527826012612df3565b61253290600a612eee565b61253c9087612c54565b905060008315612562576127106125538588612c54565b61255d9190612c73565b61257d565b612710600154876125739190612c54565b61257d9190612c73565b905080821161258c57866125ac565b612597836012612df3565b6125a290600a612eee565b6125ac9082612c73565b9998505050505050505050565b6040518061010001604052806008906020820280368337509192915050565b6001600160a01b03811681146125ed57600080fd5b50565b6000806040838503121561260357600080fd5b823561260e816125d8565b9150602083013561261e816125d8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561266857612668612629565b604052919050565b600067ffffffffffffffff82111561268a5761268a612629565b5060051b60200190565b600082601f8301126126a557600080fd5b813560206126ba6126b583612670565b61263f565b82815260059290921b840181019181810190868411156126d957600080fd5b8286015b848110156126fd5780356126f0816125d8565b83529183019183016126dd565b509695505050505050565b60008060006060848603121561271d57600080fd5b833567ffffffffffffffff8082111561273557600080fd5b61274187838801612694565b945060209150818601358181111561275857600080fd5b61276488828901612694565b94505060408601358181111561277957600080fd5b86019050601f8101871361278c57600080fd5b803561279a6126b582612670565b81815260059190911b820183019083810190898311156127b957600080fd5b928401925b828410156127e757833580600f0b81146127d85760008081fd5b825292840192908401906127be565b80955050505050509250925092565b60006020828403121561280857600080fd5b8135610a19816125d8565b634e487b7160e01b600052602160045260246000fd5b602081016002831061284b57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006060848603121561286657600080fd5b8335612871816125d8565b92506020840135612881816125d8565b91506040840135612891816125d8565b809150509250925092565b6000815180845260005b818110156128c2576020818501810151868301820152016128a6565b818111156128d4576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561293e57603f1988860301845261292c85835161289c565b94509285019290850190600101612910565b5092979650505050505050565b6000806000806080858703121561296157600080fd5b843561296c816125d8565b9350602085013561297c816125d8565b9250604085013561298c816125d8565b9396929550929360600135925050565b6000602082840312156129ae57600080fd5b813560028110610a1957600080fd5b6000806000606084860312156129d257600080fd5b83356129dd816125d8565b925060208401356129ed816125d8565b929592945050506040919091013590565b60008060408385031215612a1157600080fd5b8235612a1c816125d8565b946020939093013593505050565b60008060408385031215612a3d57600080fd5b823567ffffffffffffffff80821115612a5557600080fd5b612a6186838701612694565b9350602091508185013581811115612a7857600080fd5b85019050601f81018613612a8b57600080fd5b8035612a996126b582612670565b81815260059190911b82018301908381019088831115612ab857600080fd5b928401925b82841015612ae55783358015158114612ad65760008081fd5b82529284019290840190612abd565b80955050505050509250929050565b600060208284031215612b0657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b4e5783516001600160a01b031683529284019291840191600101612b29565b50909695505050505050565b600060208284031215612b6c57600080fd5b8151610a19816125d8565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b602080825260079082015266042d8cadccee8d60cb1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612c3457612c34612c0a565b5060010190565b600060208284031215612c4d57600080fd5b5051919050565b6000816000190483118215151615612c6e57612c6e612c0a565b500290565b600082612c9057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612ca857612ca8612c0a565b500190565b6001600160a01b0383168152604060208201819052600090610a169083018461289c565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b8060005b6002811015611393578151845260209384019390910190600101612d0c565b60608101612d398285612d08565b82151560408301529392505050565b8060005b6003811015611393578151845260209384019390910190600101612d4c565b60808101612d798285612d48565b82151560608301529392505050565b60808101612d968286612d08565b8360408301528215156060830152949350505050565b60a08101612dba8286612d48565b8360608301528215156080830152949350505050565b600060208284031215612de257600080fd5b815160ff81168114610a1957600080fd5b600082821015612e0557612e05612c0a565b500390565b600181815b80851115612e45578160001904821115612e2b57612e2b612c0a565b80851615612e3857918102915b93841c9390800290612e0f565b509250929050565b600082612e5c57506001610996565b81612e6957506000610996565b8160018114612e7f5760028114612e8957612ea5565b6001915050610996565b60ff841115612e9a57612e9a612c0a565b50506001821b610996565b5060208310610133831016604e8410600b8410161715612ec8575081810a610996565b612ed28383612e0a565b8060001904821115612ee657612ee6612c0a565b029392505050565b6000610a198383612e4d56fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/QuickSwapPoolAdapter.json b/deployments/polygon/QuickSwapPoolAdapter.json new file mode 100644 index 000000000..281a984e3 --- /dev/null +++ b/deployments/polygon/QuickSwapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x427A8ec94ce6b0fD6Ac52DCB140d55A046D87ACE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "factoryRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xed115800251810fb235d5e63711a032cdc8419064976af8d7af311e30cb0e83a", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x427A8ec94ce6b0fD6Ac52DCB140d55A046D87ACE", + "transactionIndex": 18, + "gasUsed": "2262287", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0xcea474f7a8fd67cddf51fa1d68ad7b1e624a4aa3d1bc13f866fb3e8faaa47597", + "transactionHash": "0xed115800251810fb235d5e63711a032cdc8419064976af8d7af311e30cb0e83a", + "logs": [ + { + "transactionIndex": 18, + "blockNumber": 26876070, + "transactionHash": "0xed115800251810fb235d5e63711a032cdc8419064976af8d7af311e30cb0e83a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x0000000000000000000000000000000000000000000000000191dce6e78352980000000000000000000000000000000000000000000000002a2cbc2cfe57ec000000000000000000000000000000000000000000000005a6926073b9d53a8b94000000000000000000000000000000000000000000000000289adf4616d499680000000000000000000000000000000000000000000005a693f250a0bcbdde2c", + "logIndex": 52, + "blockHash": "0xcea474f7a8fd67cddf51fa1d68ad7b1e624a4aa3d1bc13f866fb3e8faaa47597" + } + ], + "blockNumber": 26876070, + "cumulativeGasUsed": "6381551", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027663803806200276683398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b580620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c806385541e44116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b806385541e44146103425780638d87c4eb1461035557806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c578063770788721461031f5780637c47b3f41461032d57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e3735757371414417b8c6caad45baef941abc7d3ab3281565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e3610290366004612232565b61034061033b36600461239a565b610bb4565b005b61022b6103503660046123bb565b610cc4565b6101e373a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b61022b61037e36600461224f565b610e93565b61022b61271081565b61034061039a3660046123fc565b610f01565b6103406103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b6103406103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61034061043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff8885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b0316735757371414417b8c6caad45baef941abc7d3ab326001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd8560056124c7565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107ca611e07846107cd6124c7565b611e38611e1786623cda296124c7565b611e2486623cda206124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e56124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c35760003560e01c806385541e44116100f9578063da699f9611610097578063ee665bed11610071578063ee665bed146103fe578063ef856be914610411578063f1aacbb714610431578063f49307ca1461044457600080fd5b8063da699f96146103c5578063df935722146103d8578063e49d5ecc146103eb57600080fd5b8063918f8674116100d3578063918f867414610383578063919b69d71461038c578063a91ee0dc1461039f578063d74baaf8146103b257600080fd5b806385541e44146103425780638d87c4eb1461035557806390e616051461037057600080fd5b8063489b529511610166578063609257791161014057806360925779146102f957806364dd5f801461030c578063770788721461031f5780637c47b3f41461032d57600080fd5b8063489b5295146102a65780634ad36e02146102c65780634f83b52d146102d957600080fd5b806328c1f99b116101a257806328c1f99b146102425780632af06b96146102555780632de778381461026f57806336d8bf931461028257600080fd5b8062fac1cf146101c8578063027a304d14610200578063191c194b14610239575b600080fd5b6101e3735757371414417b8c6caad45baef941abc7d3ab3281565b6040516001600160a01b0390911681526020015b60405180910390f35b61022b61020e3660046121bb565b600160209081526000928352604080842090915290825290205481565b6040519081526020016101f7565b61022b60035481565b6000546101e3906001600160a01b031681565b6004546102629060ff1681565b6040516101f7919061220a565b61022b61027d3660046121bb565b610457565b610296610290366004612232565b50600090565b60405190151581526020016101f7565b6102b96102b436600461224f565b6104d7565b6040516101f791906122e7565b61022b6102d4366004612349565b61055e565b61022b6102e7366004612232565b60026020526000908152604090205481565b6102b9610307366004612349565b6105aa565b61022b61031a36600461224f565b610ba2565b6101e3610290366004612232565b61034061033b36600461239a565b610bb4565b005b61022b6103503660046123bb565b610cc4565b6101e373a5e0829caced8ffdd4de3c43696c57f7d7a678ff81565b61022b61037e36600461224f565b610e93565b61022b61271081565b61034061039a3660046123fc565b610f01565b6103406103ad366004612232565b610fef565b6101e36103c03660046121bb565b919050565b6103406103d3366004612428565b61112b565b6102b96103e6366004612349565b611205565b6102966103f9366004612349565b61180f565b61022b61040c3660046123bb565b61182a565b61042461041f3660046121bb565b6119a0565b6040516101f79190612485565b61034061043f3660046123bb565b611af0565b6102b961045236600461224f565b611bee565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c59190612498565b6104d09060026124c7565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105479190612498565b905061055585858584611205565b95945050505050565b60008061056c868686610e93565b9050600061057b878787610ba2565b90508061058885846124c7565b61059291906124e6565b61059d906001612508565b925050505b949350505050565b606081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816105c85790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064293929101612520565b6040516020818303038152906040528160008151811061066457610664612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d193929101612520565b604051602081830303815290604052816001815181106106f3576106f3612544565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610762919061255a565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c9919061258e565b506001600160701b031691506001600160701b0316915060006107ed878484611c0b565b9050806107fa87856124c7565b61080491906124e6565b92508061081187846124c7565b61081b91906124e6565b9150876001600160a01b0316846001600160a01b0316141561089f57866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610875573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610899919061255a565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e482015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093193929101612520565b6040516020818303038152906040528560028151811061095357610953612544565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b593929101612520565b604051602081830303815290604052856003815181106109d7576109d7612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4493929101612520565b60405160208183030381529060405285600481518110610a6657610a66612544565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aaa57610aaa612544565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610ade57610ade612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838d600019604051602401610b2f9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6893929101612520565b60405160208183030381529060405286600581518110610b8a57610b8a612544565b60200260200101819052505050505050949350505050565b60006105a2838361040c878787610e93565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c29919061255a565b6001600160a01b0316336001600160a01b031614610c625760405162461bcd60e51b8152600401610c5990612612565b60405180910390fd5b6004805482919060ff191660018381811115610c8057610c806121f4565b021790555033816001811115610c9857610c986121f4565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2b919061258e565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae919061255a565b6001600160a01b031614610dbe57905b6000610dca8386611df6565b90506000610dd9828585611e4c565b9050610de58285612508565b9350610df18184612649565b92506000610e00888686611c0b565b90506000610e0e8489612649565b90506000610e1d828888611f2b565b905083811115610e37575082610e34818789611f2b565b91505b600087610e4485856124c7565b610e4e91906124e6565b905086610e5b85846124c7565b610e6591906124e6565b811115610e845786610e7785846124c7565b610e8191906124e6565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610edd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a29190612498565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f76919061255a565b6001600160a01b0316336001600160a01b031614610fa65760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611040573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611064919061255a565b6001600160a01b0316336001600160a01b0316146110c45760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c59565b6001600160a01b0381163b6111095760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c59565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a0919061255a565b6001600160a01b0316336001600160a01b0316146111d05760405162461bcd60e51b8152600401610c5990612612565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611212848484611fcb565b915081156105a25760408051600680825260e0820190925290816020015b60608152602001906001900390816112305790505060405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112aa93929101612520565b604051602081830303815290604052816000815181106112cc576112cc612544565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611341919061258e565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061255a565b9450886001600160a01b0316856001600160a01b031614156114455760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611442919061255a565b94505b61144f8288611df6565b935061145c848383611e4c565b60405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c493929101612520565b604051602081830303815290604052846001815181106114e6576114e6612544565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152a5761152a612544565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155e5761155e612544565b60200260200101906001600160a01b031690816001600160a01b03168152505073a5e0829caced8ffdd4de3c43696c57f7d7a678ff836000838c6000196040516024016115af9594939291906125d3565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e893929101612520565b6040516020818303038152906040528560028151811061160a5761160a612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167793929101612520565b6040516020818303038152906040528560038151811061169957611699612544565b602090810291909101015260405173a5e0829caced8ffdd4de3c43696c57f7d7a678ff602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170693929101612520565b6040516020818303038152906040528560048151811061172857611728612544565b602090810291909101015273a5e0829caced8ffdd4de3c43696c57f7d7a678ff8885611754868a612649565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d693929101612520565b604051602081830303815290604052856005815181106117f8576117f8612544565b602002602001018190525050505050949350505050565b60008061181d868686610ba2565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611891919061258e565b506001600160701b031691506001600160701b0316915060006118b5868484611c0b565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611923919061255a565b6001600160a01b031614611935579091905b60008161194287866124c7565b61194c91906124e6565b905060008261195b88866124c7565b61196591906124e6565b90506000611986826119778188612649565b611981868a612649565b611e4c565b90506119928184612508565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a22919061255a565b81600081518110611a3557611a35612544565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab7919061255a565b81600181518110611aca57611aca612544565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b65919061255a565b6001600160a01b0316336001600160a01b031614611b955760405162461bcd60e51b8152600401610c5990612612565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfd858585610e93565b9050610555858585846105aa565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6f9190612498565b905060006001600160a01b0316735757371414417b8c6caad45baef941abc7d3ab326001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf2919061255a565b6001600160a01b0316146104d0576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d649190612498565b90508015611dee576000611d80611d7b85876124c7565b612134565b90506000611d8d83612134565b905080821115611deb576000611da38284612649565b611dad90866124c7565b9050600082611dbd8560056124c7565b611dc79190612508565b90506000611dd582846124e6565b90508015611de7576119928188612508565b5050505b50505b509392505050565b60006107ca611e07846107cd6124c7565b611e38611e1786623cda296124c7565b611e2486623cda206124c7565b611e2e9190612508565b611d7b90876124c7565b611e429190612649565b6104d091906124e6565b6000808411611eb15760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c59565b600083118015611ec15750600082115b611edd5760405162461bcd60e51b8152600401610c5990612660565b6000611eeb856103e56124c7565b90506000611ef984836124c7565b9050600082611f0a876103e86124c7565b611f149190612508565b9050611f2081836124e6565b979650505050505050565b6000808411611f8a5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c59565b600083118015611f9a5750600082115b611fb65760405162461bcd60e51b8152600401610c5990612660565b82611fc183866124c7565b6105a291906124e6565b60008060045460ff166001811115611fe557611fe56121f4565b141561204b576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204457506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d0565b50806104d0565b60006120578486610457565b6001600160a01b038516600090815260026020526040902054909150156120f0576001600160a01b0384166000908152600260205260409020546127109061209f90836124c7565b6120a991906124e6565b8311156120e8576001600160a01b038416600090815260026020526040902054612710906120d790836124c7565b6120e191906124e6565b9150611dee565b829150611dee565b60035415611dee576127106003548261210991906124c7565b61211391906124e6565b83111561212b57612710600354826120d791906124c7565b50909392505050565b60006003821115612195575080600061214e6002836124e6565b612159906001612508565b90505b8181101561218f5790508060028161217481866124e6565b61217e9190612508565b61218891906124e6565b905061215c565b50919050565b81156103c057506001919050565b6001600160a01b03811681146121b857600080fd5b50565b600080604083850312156121ce57600080fd5b82356121d9816121a3565b915060208301356121e9816121a3565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222c57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224457600080fd5b81356104d0816121a3565b60008060006060848603121561226457600080fd5b833561226f816121a3565b9250602084013561227f816121a3565b9150604084013561228f816121a3565b809150509250925092565b6000815180845260005b818110156122c0576020818501810151868301820152016122a4565b818111156122d2576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233c57603f1988860301845261232a85835161229a565b9450928501929085019060010161230e565b5092979650505050505050565b6000806000806080858703121561235f57600080fd5b843561236a816121a3565b9350602085013561237a816121a3565b9250604085013561238a816121a3565b9396929550929360600135925050565b6000602082840312156123ac57600080fd5b8135600281106104d057600080fd5b6000806000606084860312156123d057600080fd5b83356123db816121a3565b925060208401356123eb816121a3565b929592945050506040919091013590565b6000806040838503121561240f57600080fd5b823561241a816121a3565b946020939093013593505050565b60006020828403121561243a57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247a5781516001600160a01b031687529582019590820190600101612455565b509495945050505050565b6020815260006104d06020830184612441565b6000602082840312156124aa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e1576124e16124b1565b500290565b60008261250357634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251b5761251b6124b1565b500190565b6001600160a01b03831681526040602082018190526000906105a29083018461229a565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256c57600080fd5b81516104d0816121a3565b80516001600160701b03811681146103c057600080fd5b6000806000606084860312156125a357600080fd5b6125ac84612577565b92506125ba60208501612577565b9150604084015163ffffffff8116811461228f57600080fd5b85815260ff8516602082015260a0604082015260006125f560a0830186612441565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265b5761265b6124b1565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/Registry.json b/deployments/polygon/Registry.json new file mode 100644 index 000000000..442dd2331 --- /dev/null +++ b/deployments/polygon/Registry.json @@ -0,0 +1,2142 @@ +{ + "address": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_riskProfileCodes", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "_names", + "type": "string[]" + }, + { + "internalType": "string[]", + "name": "_symbols", + "type": "string[]" + }, + { + "internalType": "bool[]", + "name": "_canBorrow", + "type": "bool[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange[]", + "name": "_poolRatingRanges", + "type": "tuple[]" + } + ], + "name": "addRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "approveLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "approveLiquidityPoolAndMapToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "approveTokenAndMapToTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RegistryProxy", + "name": "_registryProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFinanceOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getHarvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPool", + "outputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "internalType": "struct DataTypes.LiquidityPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "getLiquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getODEFIVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOPTYDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "getRiskProfile", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "poolRatingsRange", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "internalType": "struct DataTypes.RiskProfile", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRiskProfileList", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStrategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenHashes", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getTokensHashByIndex", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashIndexByHash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + } + ], + "name": "getTokensHashToTokenList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "isApprovedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "rate", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRate[]", + "name": "_poolRates", + "type": "tuple[]" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_rate", + "type": "uint8" + } + ], + "name": "rateLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "removeRiskProfile", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeCreditPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_pools", + "type": "address[]" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + } + ], + "name": "revokeLiquidityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "revokeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_harvestCodeProvider", + "type": "address" + } + ], + "name": "setHarvestCodeProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pool", + "type": "address" + }, + { + "internalType": "address", + "name": "_adapter", + "type": "address" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "internalType": "struct DataTypes.PoolAdapter[]", + "name": "_poolAdapters", + "type": "tuple[]" + } + ], + "name": "setLiquidityPoolToAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_odefiVaultBooster", + "type": "address" + } + ], + "name": "setODEFIVaultBooster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_opty", + "type": "address" + } + ], + "name": "setOPTY", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskManager", + "type": "address" + } + ], + "name": "setRiskManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyProvider", + "type": "address" + } + ], + "name": "setStrategyProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "internalType": "struct DataTypes.TokensHashDetail[]", + "name": "_tokensHashesDetails", + "type": "tuple[]" + } + ], + "name": "setTokensHashToTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + } + ], + "internalType": "struct DataTypes.PoolRatingsRange", + "name": "_poolRatingRange", + "type": "tuple" + } + ], + "name": "updateRPPoolRatings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_canBorrow", + "type": "bool" + } + ], + "name": "updateRiskProfileBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0c684acf7804265e07dc14a78417869d55ac1312a914cd47f192cdecfb33ad19", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xEe10F4F3b8A38c178Ed375f8E1064b1b5C964ad5", + "transactionIndex": 31, + "gasUsed": "3504759", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000400000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000400000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x1b9791dd4ab49b31db183d67f6201b63d0911c9c62dc32629c6899d06448ae4d", + "transactionHash": "0x0c684acf7804265e07dc14a78417869d55ac1312a914cd47f192cdecfb33ad19", + "logs": [ + { + "transactionIndex": 31, + "blockNumber": 26875910, + "transactionHash": "0x0c684acf7804265e07dc14a78417869d55ac1312a914cd47f192cdecfb33ad19", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000007c7379531b2aee82e4ca06d4175d13b9cbeafd49" + ], + "data": "0x000000000000000000000000000000000000000000000000026e91fcae33b3f500000000000000000000000000000000000000000000000036a4621124cc700000000000000000000000000000000000000000000000cd7862f6fdea073d35d40000000000000000000000000000000000000000000000003435d0147698bc0b00000000000000000000000000000000000000000000cd7865658fe6b570e9c9", + "logIndex": 98, + "blockHash": "0x1b9791dd4ab49b31db183d67f6201b63d0911c9c62dc32629c6899d06448ae4d" + } + ], + "blockNumber": 26875910, + "cumulativeGasUsed": "6129825", + "status": 1, + "byzantium": true + }, + "args": [], + "bytecode": "0x608060405234801561001057600080fd5b50613e67806100206000396000f3fe608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104e35760003560e01c80638a16ce861161028e578063ae0cd29911610167578063e4860339116100d9578063f192e82c11610092578063f192e82c14610a5e578063f39c38a014610a71578063fa0ad89614610a79578063fabee0e614610a8c578063fc50f22414610a94578063fe794f9314610aa7576104e3565b8063e486033914610a02578063e7f43c6814610a15578063e990b46c14610a1d578063edd0fd7e14610a30578063ef1bbb9814610a38578063f0f4426014610a4b576104e3565b8063d117f0f21161012b578063d117f0f2146109b1578063d3af584c146109c4578063d41fa529146109d7578063d71f05e6146109df578063d9cafe72146109e7578063e1e1a62e146109fa576104e3565b8063ae0cd2991461095d578063b3ab15fb14610970578063b7407bf614610983578063bcd2c20f1461098b578063cbd6e6c31461099e576104e3565b80639ec39e2f11610200578063a7b61c51116101c4578063a7b61c51146108f6578063a7d8c1a4146108fe578063a91624c614610911578063a99e772114610924578063a9f9e68614610937578063adbd11551461094a576104e3565b80639ec39e2f146108925780639fac5d4a146108b2578063a1194c8e146108ba578063a2631006146108cd578063a3c0c800146108e3576104e3565b8063933f4eef11610252578063933f4eef14610841578063941074fe1461085457806394990bd8146108675780639611ad2d1461086f578063992812b7146108775780639be142831461087f576104e3565b80638a16ce86146107d85780638bb01810146107e05780638fca99b21461080857806390d8c5a41461081b578063923bb7ff1461082e576104e3565b8063570ca735116103c05780636fa97306116103325780637af0e557116102f65780637af0e5571461077a5780637f70cc921461078257806380b2edd81461078a5780638346525f1461079d57806384e37fbf146107bd578063884a7e19146107c5576104e3565b80636fa973061461071957806370011e611461072e5780637445a23b14610741578063761125fc1461075457806379b39f8d14610767576104e3565b806361660c5e1161038457806361660c5e146106d357806361d027b3146106db57806362ca8460146106e3578063689589a2146106f65780636afe4cbe146106fe5780636cc1761e14610711576104e3565b8063570ca735146106955780635812de431461069d5780635967f7ee146106b05780635aa6e675146106b85780635d3cae15146106c0576104e3565b80632e465b2911610459578063466dbe801161041d578063466dbe8014610639578063478426631461064c5780634a5175f4146106545780634ad8efe6146106675780634cacbb421461067a5780634d911ab414610682576104e3565b80632e465b29146105f05780632ea8f44e14610603578063314e5fee1461060b5780633753c6371461061e57806339b70e3814610631576104e3565b80631e57e187116104ab5780631e57e1871461056f57806321310c2b1461058257806326c29c1c14610595578063289b3c0d146105a85780632ae94863146105b05780632d5ad3d5146105d0576104e3565b806305415996146104e85780630af3a496146105065780630b0fd47e1461051b5780630dfbe91b1461053c5780631d1628b31461054f575b600080fd5b6104f0610aba565b6040516104fd919061389d565b60405180910390f35b6105196105143660046133ad565b610ac9565b005b61052e610529366004613301565b610b30565b6040516104fd929190613ddb565b61052e61054a366004613301565b610b4e565b61056261055d366004613701565b610b6c565b6040516104fd9190613982565b61051961057d366004613719565b610b7e565b6105196105903660046133ad565b610be3565b6105196105a3366004613301565b610c3d565b6104f0610c89565b6105c36105be366004613301565b610c98565b6040516104fd9190613d28565b6105e36105de366004613301565b610ce0565b6040516104fd9190613936565b6105196105fe366004613301565b610cfe565b6104f0610d34565b610519610619366004613301565b610d43565b61051961062c366004613301565b610e30565b6104f0610ed3565b61051961064736600461356a565b610ee2565b6104f0610faa565b6105196106623660046134b1565b610fb9565b610519610675366004613340565b61102f565b6104f06110a0565b61051961069036600461379a565b6110af565b6104f06110ed565b6105626106ab366004613701565b6110fc565b6104f061111d565b6104f061112c565b6105196106ce366004613701565b61113b565b6104f061116e565b6104f061117d565b6105196106f1366004613301565b61118c565b6104f0611279565b61051961070c366004613829565b611288565b6104f06112bc565b6107216112cb565b6040516104fd91906138fe565b61051961073c366004613719565b611323565b61051961074f366004613378565b61137c565b6105196107623660046133e8565b6113b0565b610519610775366004613301565b611446565b6104f0611533565b6104f0611542565b610519610798366004613301565b611551565b6107b06107ab366004613701565b611584565b6040516104fd91906138b1565b6104f06115f3565b6105196107d3366004613301565b611602565b6104f0611635565b6107f36107ee366004613301565b611644565b6040516104fd99989796959493929190613941565b6105e3610816366004613340565b611698565b6105196108293660046133ad565b6116b8565b6104f061083c366004613301565b611712565b61051961084f366004613301565b611730565b610519610862366004613776565b611763565b6104f0611797565b6104f06117a6565b6104f06117b5565b6104f061088d366004613301565b6117c4565b6108a56108a0366004613701565b6117df565b6040516104fd9190613d44565b6104f061197a565b6105196108c8366004613301565b611989565b6108d5611ae9565b6040516104fd929190613dcd565b6105196108f1366004613635565b611af2565b6104f0611c49565b61051961090c3660046133ad565b611c58565b61051961091f366004613301565b611cb2565b6105196109323660046133ad565b611ce5565b6105196109453660046133ad565b611d3f565b610562610958366004613701565b611d8c565b61051961096b366004613301565b611d9e565b61051961097e366004613301565b611e41565b6104f0611ee4565b61051961099936600461356a565b611ef3565b6105626109ac366004613701565b611f7c565b6105196109bf366004613301565b611f9a565b6105196109d2366004613301565b612045565b610721612078565b6104f06120ce565b6105196109f5366004613340565b6120dd565b6104f0612110565b6105e3610a10366004613301565b61211f565b6104f0612134565b610519610a2b366004613301565b612143565b6104f06121e6565b610519610a463660046133e8565b6121f5565b610519610a59366004613301565b61229b565b610519610a6c3660046134b1565b61233e565b6104f06123b4565b610519610a87366004613378565b6123c3565b6104f06123f7565b610519610aa2366004613301565b612406565b610562610ab5366004613701565b6124f3565b6001546001600160a01b031690565b6004546001600160a01b03163314610afc5760405162461bcd60e51b8152600401610af390613b51565b60405180910390fd5b60005b8151811015610b2c57610b24828281518110610b1757fe5b6020026020010151612500565b600101610aff565b5050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b600b6020526000908152604090205481565b6004546001600160a01b03163314610ba85760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610bd857610bd0828281518110610bc357fe5b602002602001015161255a565b600101610bab565b50610b2c82826125b3565b6004546001600160a01b03163314610c0d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57610c35828281518110610c2857fe5b602002602001015161266b565b600101610c10565b6004546001600160a01b03163314610c675760405162461bcd60e51b8152600401610af390613b51565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b610ca0612ec6565b506001600160a01b0381166000908152600c602090815260409182902082518084019093525460ff8082168452610100909104161515908201525b919050565b6001600160a01b03166000908152600a602052604090205460ff1690565b6004546001600160a01b03163314610d285760405162461bcd60e51b8152600401610af390613b51565b610d31816126c5565b50565b6002546001600160a01b031681565b6004546001600160a01b03163314610d6d5760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de89190613324565b6001600160a01b031614610e0e5760405162461bcd60e51b8152600401610af390613c60565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e5a5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116610e805760405162461bcd60e51b8152600401610af3906139c2565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6004546001600160a01b03163314610f0c5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5760005b828281518110610f2757fe5b60200260200101516020015151811015610f6957610f61838381518110610f4a57fe5b6020026020010151602001518281518110610bc357fe5b600101610f1b565b50610fa2828281518110610f7957fe5b602002602001015160000151838381518110610f9157fe5b6020026020010151602001516125b3565b600101610f0f565b6018546001600160a01b031681565b6002546001600160a01b03163314610fe35760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c57611027828281518110610ffe57fe5b60200260200101516000015183838151811061101657fe5b602002602001015160200151612723565b600101610fe6565b6004546001600160a01b031633146110595760405162461bcd60e51b8152600401610af390613b51565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166110965760405162461bcd60e51b8152600401610af390613bd1565b610b2c82826127bf565b6016546001600160a01b031681565b6002546001600160a01b031633146110d95760405162461bcd60e51b8152600401610af390613c29565b6110e685858585856128ba565b5050505050565b6004546001600160a01b031681565b60006014828154811061110b57fe5b90600052602060002001549050919050565b601e546001600160a01b031690565b6000546001600160a01b031681565b6002546001600160a01b031633146111655760405162461bcd60e51b8152600401610af390613c29565b610d3181612abc565b6001546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031633146111b65760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112319190613324565b6001600160a01b0316146112575760405162461bcd60e51b8152600401610af390613c60565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b6002546001600160a01b031633146112b25760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612b93565b601e546001600160a01b031681565b6060601480548060200260200160405190810160405280929190818152602001828054801561131957602002820191906000526020600020905b815481526020019060010190808311611305575b5050505050905090565b6004546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610af390613b51565b61135681612c3a565b6113725760405162461bcd60e51b8152600401610af390613b07565b610b2c82826125b3565b6002546001600160a01b031633146113a65760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612c9d565b6004546001600160a01b031633146113da5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c576114068282815181106113f557fe5b6020026020010151600001516126c5565b61143e82828151811061141557fe5b60200260200101516000015183838151811061142d57fe5b6020026020010151602001516127bf565b6001016113dd565b6004546001600160a01b031633146114705760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b357600080fd5b505afa1580156114c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114eb9190613324565b6001600160a01b0316146115115760405162461bcd60e51b8152600401610af390613c60565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031690565b601b546001600160a01b031681565b6004546001600160a01b0316331461157b5760405162461bcd60e51b8152600401610af390613b51565b610d318161255a565b6000818152600b60209081526040918290206001018054835181840281018401909452808452606093928301828280156115e757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c9575b50505050509050919050565b6009546001600160a01b031681565b6004546001600160a01b0316331461162c5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d39565b6019546001600160a01b031690565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b6004546001600160a01b031633146116e25760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c5761170a8282815181106116fd57fe5b6020026020010151612d39565b6001016116e5565b6001600160a01b039081166000908152600e60205260409020541690565b6004546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610af390613b51565b610d3181612d97565b6002546001600160a01b0316331461178d5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612de4565b601c546001600160a01b031681565b6003546001600160a01b031681565b6016546001600160a01b031690565b600e602052600090815260409020546001600160a01b031681565b6117e7612edd565b6000828152600f6020908152604091829020825160c0810184528154815260018083015460ff90811615158386015285518087018752600280860154808416835261010090819004841683890152858901929092526003860154909216151560608501526004850180548851948116159092026000190190911691909104601f8101869004860283018601909652858252919492936080860193919291908301828280156118d65780601f106118ab576101008083540402835291602001916118d6565b820191906000526020600020905b8154815290600101906020018083116118b957829003601f168201915b505050918352505060058201805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815293820193929183018282801561196a5780601f1061193f5761010080835404028352916020019161196a565b820191906000526020600020905b81548152906001019060200180831161194d57829003601f168201915b5050505050815250509050919050565b601d546001600160a01b031681565b806001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156119c257600080fd5b505afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190613324565b6001600160a01b0316336001600160a01b031614611a2a5760405162461bcd60e51b8152600401610af3906139e7565b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a6557600080fd5b505af1158015611a79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9d919061375e565b15611aba5760405162461bcd60e51b8152600401610af390613ae0565b50601780546001600160a01b0319908116909155601c805482169055601a805482169055601d80549091169055565b60125460135482565b6002546001600160a01b03163314611b1c5760405162461bcd60e51b8152600401610af390613c29565b6000855111611b3d5760405162461bcd60e51b8152600401610af390613b88565b8051855114611b5e5760405162461bcd60e51b8152600401610af390613bfa565b8151855114611b7f5760405162461bcd60e51b8152600401610af390613a88565b8351855114611ba05760405162461bcd60e51b8152600401610af390613cdb565b8251855114611bc15760405162461bcd60e51b8152600401610af390613a5d565b60005b8551811015611c4157611c39868281518110611bdc57fe5b6020026020010151868381518110611bf057fe5b6020026020010151868481518110611c0457fe5b6020026020010151868581518110611c1857fe5b6020026020010151868681518110611c2c57fe5b60200260200101516128ba565b600101611bc4565b505050505050565b6019546001600160a01b031681565b6004546001600160a01b03163314611c825760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611caa828281518110611c9d57fe5b6020026020010151612d97565b600101611c85565b6004546001600160a01b03163314611cdc5760405162461bcd60e51b8152600401610af390613b51565b610d318161266b565b6004546001600160a01b03163314611d0f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d37828281518110611d2a57fe5b60200260200101516126c5565b600101611d12565b6004546001600160a01b03163314611d695760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611d84828281518110610bc357fe5b600101611d6c565b6000908152600b602052604090205490565b6000546001600160a01b03163314611dc85760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611dee5760405162461bcd60e51b8152600401610af3906139c2565b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b03163314611e6b5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b038116611e915760405162461bcd60e51b8152600401610af3906139c2565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b6004546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57611f49828281518110611f3857fe5b602002602001015160200151612c3a565b611f655760405162461bcd60e51b8152600401610af390613b07565b611f74828281518110610f7957fe5b600101611f20565b60158181548110611f8957fe5b600091825260209091200154905081565b6000546001600160a01b03163314611fc45760405162461bcd60e51b8152600401610af39061398b565b611fd6816001600160a01b0316612e7c565b611ff25760405162461bcd60e51b8152600401610af390613c8b565b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b6004546001600160a01b0316331461206f5760405162461bcd60e51b8152600401610af390613b51565b610d3181612500565b606060158054806020026020016040519081016040528092919081815260200182805480156113195760200282019190600052602060002090815481526020019060010190808311611305575050505050905090565b6018546001600160a01b031690565b6004546001600160a01b031633146121075760405162461bcd60e51b8152600401610af390613b51565b611096826126c5565b6006546001600160a01b031690565b600a6020526000908152604090205460ff1681565b6004546001600160a01b031690565b6000546001600160a01b0316331461216d5760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166121935760405162461bcd60e51b8152600401610af3906139c2565b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6004546001600160a01b0316331461221f5760405162461bcd60e51b8152600401610af390613b51565b60005b8151811015610b2c57600c600083838151811061223b57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002054610100900460ff166122845760405162461bcd60e51b8152600401610af390613bd1565b61229382828151811061141557fe5b600101612222565b6000546001600160a01b031633146122c55760405162461bcd60e51b8152600401610af39061398b565b6001600160a01b0381166122eb5760405162461bcd60e51b8152600401610af3906139c2565b600580546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907f62416168b36f7c9244e51510f415e6512f57da42e56fa145081a482f5d5ce4b190600090a350565b6002546001600160a01b031633146123685760405162461bcd60e51b8152600401610af390613c29565b60005b8151811015610b2c576123ac82828151811061238357fe5b60200260200101516000015183838151811061239b57fe5b602002602001015160200151612c9d565b60010161236b565b6007546001600160a01b031681565b6002546001600160a01b031633146123ed5760405162461bcd60e51b8152600401610af390613c29565b610b2c8282612723565b6003546001600160a01b031690565b6004546001600160a01b031633146124305760405162461bcd60e51b8152600401610af390613b51565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab9190613324565b6001600160a01b0316146124d15760405162461bcd60e51b8152600401610af390613c60565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60148181548110611f8957fe5b6001600160a01b0381166000818152600c6020526040808220805461ff001916908190559051339361010090920460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0381166000818152600a6020526040808220805460ff1916600117908190559051339360ff929092161515927f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb573059991a450565b6125bc82612e82565b6125d85760405162461bcd60e51b8152600401610af390613cb0565b60148054600180820183557fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910184905590546000848152600b602090815260409091206000199092018255835161263993929092019190840190612f15565b50604051339083907f116e2ff1d8e145cf56c90f52edfa42b39a6cea0a2f09e5dc9a165bc545b9dd8c90600090a35050565b6001600160a01b0381166000818152600d6020526040808220805461ff001916908190559051339361010090920460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600c6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927f70ef6484131845f6ad6f5fbca17ba970d81b6d88facffe0a86445a26844b735f91a450565b6001600160a01b0382166000908152600c6020526040902054610100900460ff166127605760405162461bcd60e51b8152600401610af390613bd1565b6001600160a01b0382166000818152600c6020526040808220805460ff191660ff868116919091179182905591513394919092169290917fcf84b287f966c5e78b7ee4a4e83629c9f8e12d5103506289ed75f665f9be60349190a45050565b306001600160a01b0316816001600160a01b03166328c1f99b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561280257600080fd5b505afa158015612816573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283a9190613324565b6001600160a01b0316146128605760405162461bcd60e51b8152600401610af390613c60565b6001600160a01b038281166000818152600e602052604080822080546001600160a01b031916948616948517905551339392917f1e71d63d9ed2b661b86f8983b9ae7b77b0765ffce598e3a86665d1482823211f91a45050565b6000858152600f602052604090206003015460ff16156128ec5760405162461bcd60e51b8152600401610af390613ab5565b600084511161290d5760405162461bcd60e51b8152600401610af390613a0c565b600083511161292e5760405162461bcd60e51b8152600401610af390613b28565b60158054600181019091557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475018590556000858152600f60209081526040909120855161298392600490920191870190612f7a565b506000858152600f6020908152604090912084516129a992600590920191860190612f7a565b506000858152600f60209081526040918290206001808201805460ff19908116881515179182905586516002850180549689015196831660ff9283161761ff0019166101009783169790970296909617909555601554600019018085556003909401805490911690921791829055935193831615159392161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612a5190339061389d565b60405180910390a46000858152600f60205260409081902060028101549054915160ff6101008304811693921691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612aad90339061389d565b60405180910390a45050505050565b601554811115612ade5760405162461bcd60e51b8152600401610af390613a33565b600060158281548110612aed57fe5b6000918252602080832090910154808352600f90915260409091206003015490915060ff16612b2e5760405162461bcd60e51b8152600401610af390613d04565b6000818152600f602052604080822060038101805460ff1916905560010154905160ff9091161515919084907ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b60405180910390a45050565b6000828152600f602052604090206003015460ff16612bc45760405162461bcd60e51b8152600401610af390613d04565b80516000838152600f60209081526040918290206002810180549286015160ff1990931660ff9586161761ff00191661010093861684021790819055905492519181048416931691907f4094bfe2123affbdc4bb8b026f1f9e040399a1f1ea10d34debea7d9767b8532390612b8790339061389d565b6000805b8251811015612c9457600a6000848381518110612c5757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff16612c8c576000915050610cdb565b600101612c3e565b50600192915050565b6001600160a01b0382166000908152600d6020526040902054610100900460ff16612cda5760405162461bcd60e51b8152600401610af390613bab565b6001600160a01b0382166000818152600d6020526040808220805460ff191660ff868116919091179182905591513394919092169290917f3500e655253e4fffbb615b83796bac7caee09deb85f6937161144e70a10617a19190a45050565b6001600160a01b0381166000818152600d6020526040808220805461ff00191661010090811791829055915133949290910460ff161515927fac5e05816217145d56701047113cfd15a5b83238ecc0778cb0d807d7bab1c78391a450565b6001600160a01b0381166000818152600a6020526040808220805460ff19169055513392907f77708ed8f9bdf7c080ae7c78963aa6f52e70010691041c0b8b938a5eb5730599908390a450565b6000828152600f602052604090206003015460ff16612e155760405162461bcd60e51b8152600401610af390613d04565b6000828152600f60205260409081902060018101805460ff1916841515179081905560038201549154925160ff918216151593919092161515917ff1399df5dc4422c1043b8e73d714594b13e53e28b0b6ac5fd34a4ddb3bc0eaad90612b8790339061389d565b3b151590565b601454600090612e9457506001610cdb565b6000828152600b6020526040902054601480548492908110612eb257fe5b906000526020600020015414159050919050565b604080518082019091526000808252602082015290565b6040805160c08101825260008082526020820152908101612efc612ec6565b8152600060208201526060604082018190529081015290565b828054828255906000526020600020908101928215612f6a579160200282015b82811115612f6a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612f35565b50612f76929150612ff4565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612fbb57805160ff1916838001178555612fe8565b82800160010185558215612fe8579182015b82811115612fe8578251825591602001919060010190612fcd565b50612f76929150613013565b5b80821115612f765780546001600160a01b0319168155600101612ff5565b5b80821115612f765760008155600101613014565b803561303381613e37565b92915050565b600082601f830112613049578081fd5b813561305c61305782613e17565b613df0565b81815291506020808301908481018184028601820187101561307d57600080fd5b60005b848110156130a557813561309381613e37565b84529282019290820190600101613080565b505050505092915050565b600082601f8301126130c0578081fd5b81356130ce61305782613e17565b8181529150602080830190848101818402860182018710156130ef57600080fd5b6000805b8581101561311c578235801515811461310a578283fd5b855293830193918301916001016130f3565b50505050505092915050565b600082601f830112613138578081fd5b813561314661305782613e17565b818152915060208083019084810160005b848110156130a55761316e888484358a0101613246565b84529282019290820190600101613157565b600082601f830112613190578081fd5b813561319e61305782613e17565b81815291506020808301908481016040808502870183018810156131c157600080fd5b60005b8581101561311c576131d689846132af565b855293830193918101916001016131c4565b600082601f8301126131f8578081fd5b813561320661305782613e17565b81815291506020808301908481018184028601820187101561322757600080fd5b60005b848110156130a55781358452928201929082019060010161322a565b600082601f830112613256578081fd5b813567ffffffffffffffff81111561326c578182fd5b61327f601f8201601f1916602001613df0565b915080825283602082850101111561329657600080fd5b8060208401602084013760009082016020015292915050565b6000604082840312156132c0578081fd5b6132ca6040613df0565b90506132d683836132f0565b81526132e583602084016132f0565b602082015292915050565b803560ff8116811461303357600080fd5b600060208284031215613312578081fd5b813561331d81613e37565b9392505050565b600060208284031215613335578081fd5b815161331d81613e37565b60008060408385031215613352578081fd5b823561335d81613e37565b9150602083013561336d81613e37565b809150509250929050565b6000806040838503121561338a578182fd5b823561339581613e37565b91506133a484602085016132f0565b90509250929050565b6000602082840312156133be578081fd5b813567ffffffffffffffff8111156133d4578182fd5b6133e084828501613039565b949350505050565b600060208083850312156133fa578182fd5b823567ffffffffffffffff811115613410578283fd5b8301601f81018513613420578283fd5b803561342e61305782613e17565b818152838101908385016040808502860187018a101561344c578788fd5b8795505b848610156134a35780828b031215613466578788fd5b61346f81613df0565b823561347a81613e37565b81528288013561348981613e37565b818901528452600195909501949286019290810190613450565b509098975050505050505050565b600060208083850312156134c3578182fd5b823567ffffffffffffffff8111156134d9578283fd5b8301601f810185136134e9578283fd5b80356134f761305782613e17565b818152838101908385016040808502860187018a1015613515578788fd5b8795505b848610156134a35780828b03121561352f578788fd5b61353881613df0565b6135428b84613028565b81526135508b8985016132f0565b818901528452600195909501949286019290810190613519565b6000602080838503121561357c578182fd5b823567ffffffffffffffff80821115613593578384fd5b818501915085601f8301126135a6578384fd5b81356135b461305782613e17565b81815284810190848601875b848110156136265781358701604080601f19838f030112156135e0578a8bfd5b6135e981613df0565b828b01358152908201359088821115613600578b8cfd5b61360e8e8c84860101613039565b818c01528652505092870192908701906001016135c0565b50909998505050505050505050565b600080600080600060a0868803121561364c578081fd5b853567ffffffffffffffff80821115613663578283fd5b61366f89838a016131e8565b96506020880135915080821115613684578283fd5b61369089838a01613128565b955060408801359150808211156136a5578283fd5b6136b189838a01613128565b945060608801359150808211156136c6578283fd5b6136d289838a016130b0565b935060808801359150808211156136e7578283fd5b506136f488828901613180565b9150509295509295909350565b600060208284031215613712578081fd5b5035919050565b6000806040838503121561372b578182fd5b82359150602083013567ffffffffffffffff811115613748578182fd5b61375485828601613039565b9150509250929050565b60006020828403121561376f578081fd5b5051919050565b60008060408385031215613788578182fd5b82359150602083013561336d81613e4c565b600080600080600060c086880312156137b1578283fd5b85359450602086013567ffffffffffffffff808211156137cf578485fd5b6137db89838a01613246565b955060408801359150808211156137f0578485fd5b506137fd88828901613246565b935050606086013561380e81613e4c565b915061381d87608088016132af565b90509295509295909350565b6000806060838503121561383b578182fd5b823591506133a484602085016132af565b15159052565b60008151808452815b818110156138775760208185018101518683018201520161385b565b818111156138885782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b818110156138f25783516001600160a01b0316835292840192918401916001016138cd565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138f25783518352928401929184019160010161391a565b901515815260200190565b9815158952961515602089015294151560408801529215156060870152608086019190915260a085015260c084015260e08301526101008201526101200190565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b6020808252600b908201526a216164647265737328302960a81b604082015260600190565b6020808252600b908201526a21676f7665726e616e636560a81b604082015260600190565b6020808252600d908201526c52505f6e616d655f656d70747960981b604082015260600190565b60208082526010908201526f092dcecc2d8d2c8bea4e0bed2dcc8caf60831b604082015260600190565b602080825260119082015270042a4a0bee6f2dac4ded8e698cadccee8d607b1b604082015260600190565b602080825260139082015272042a4a0bec6c2dc84dee4e4deee98cadccee8d606b1b604082015260600190565b60208082526011908201527052505f616c72656164795f65786973747360781b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b60208082526007908201526621746f6b656e7360c81b604082015260600190565b6020808252600f908201526e52505f73796d626f6c5f656d70747960881b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252600990820152680216c656e6774683e360bc1b604082015260600190565b6020808252600c908201526b21637265646974506f6f6c7360a01b604082015260600190565b6020808252600f908201526e216c6971756964697479506f6f6c7360881b604082015260600190565b602080825260159082015274042a4a0bea0deded8a4c2e8d2dccee698cadccee8d605b1b604082015260600190565b6020808252601f908201527f63616c6c6572206973206e6f7420746865207269736b206f70657261746f7200604082015260600190565b602080825260119082015270085c9959da5cdd1c9e50dbdb9d1c9858dd607a1b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b602080825260119082015270042bed2e69ccaeea8ded6cadce690c2e6d607b1b604082015260600190565b6020808252600f908201526e042a4a0bedcc2dacae698cadccee8d608b1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815160ff16815260209182015115159181019190915260400190565b60006020825282516020830152602083015115156040830152604083015160ff815116606084015260ff6020820151166080840152506060830151613d8c60a084018261384c565b50608083015160e060c0840152613da7610100840182613852565b905060a0840151601f198483030160e0850152613dc48282613852565b95945050505050565b918252602082015260400190565b60ff9290921682521515602082015260400190565b60405181810167ffffffffffffffff81118282101715613e0f57600080fd5b604052919050565b600067ffffffffffffffff821115613e2d578081fd5b5060209081020190565b6001600160a01b0381168114610d3157600080fd5b8015158114610d3157600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/polygon/RegistryProxy.json b/deployments/polygon/RegistryProxy.json new file mode 100644 index 000000000..5850eb87a --- /dev/null +++ b/deployments/polygon/RegistryProxy.json @@ -0,0 +1,1342 @@ +{ + "address": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogAllowWhitelistedStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogDiscontinueVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLimitStateVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogLiquidityPoolToAdapter", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositAmountVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogQueueCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "lowerLimit", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "upperLimit", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRPPoolRatings", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateCreditPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint8", + "name": "rate", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRateLiquidityPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "indexed": true, + "internalType": "bool", + "name": "canBorrow", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogRiskProfile", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "enabled", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "tokensHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTokensToTokensHash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpauseVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "vault", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogVaultTotalValueLockedLimitInUnderlying", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newGovernance", + "type": "address" + } + ], + "name": "NewGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingGovernance", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "NewPendingGovernance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "financeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferFinanceOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "optyDistributor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOPTYDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "riskOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferRiskOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "strategyOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferStrategyOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TransferTreasury", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptGovernance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "aprOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "creditPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "financeOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvestCodeProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPoolToAdapter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidityPools", + "outputs": [ + { + "internalType": "uint8", + "name": "rating", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLiquidityPool", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "odefiVaultBooster", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opty", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyDistributor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "optyStakingRateBalancer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingGovernance", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRegistryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "riskProfilesArray", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_financeOperator", + "type": "address" + } + ], + "name": "setFinanceOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_optyDistributor", + "type": "address" + } + ], + "name": "setOPTYDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingGovernance", + "type": "address" + } + ], + "name": "setPendingGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_riskOperator", + "type": "address" + } + ], + "name": "setRiskOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategyOperator", + "type": "address" + } + ], + "name": "setStrategyOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategyProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokensHashIndexes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokensHashToTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vaultToVaultConfiguration", + "outputs": [ + { + "internalType": "bool", + "name": "discontinued", + "type": "bool" + }, + { + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isLimitedState", + "type": "bool" + }, + { + "internalType": "bool", + "name": "allowWhitelistedState", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "withdrawalFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userDepositCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumDepositAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalValueLockedLimitInUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "queueCap", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedUsers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalFeeRange", + "outputs": [ + { + "internalType": "uint256", + "name": "lowerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "upperLimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x160b583f31ddbd385073eec9dd41af206e231450f62aa01cfc5cba4ec353cad6", + "receipt": { + "to": null, + "from": "0xd26ec7401c198adac340d3a4cb8b52b845f3a542", + "contractAddress": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "transactionIndex": "0x2a", + "gasUsed": "0x131c34", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000400000000000001000001000000000010000108000000000000000000000000000004000000000000000000000000000800000000000400008000100000110000000000000000000000000000000000000040000000000000080000000000000000000000000000000000000000000020000000000000080000000000000000000200000000008000000000000000000000040000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000840000000000002000000000000000000000000000000000000002000100000", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "logs": [ + { + "address": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "topics": [ + "0xcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "blockNumber": "0x19a1804", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "transactionIndex": "0x2a", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "logIndex": "0x72", + "removed": false + }, + { + "address": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "topics": [ + "0xe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "blockNumber": "0x19a1804", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "transactionIndex": "0x2a", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "logIndex": "0x73", + "removed": false + }, + { + "address": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "topics": [ + "0xbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f15225380", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "blockNumber": "0x19a1804", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "transactionIndex": "0x2a", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "logIndex": "0x74", + "removed": false + }, + { + "address": "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "topics": [ + "0xa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac076", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542" + ], + "data": "0x", + "blockNumber": "0x19a1804", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "transactionIndex": "0x2a", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "logIndex": "0x75", + "removed": false + }, + { + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x0000000000000000000000007c7379531b2aee82e4ca06d4175d13b9cbeafd49" + ], + "data": "0x00000000000000000000000000000000000000000000000000de78bd77f159c40000000000000000000000000000000000000000000000003782dace9d90000000000000000000000000000000000000000000000000cd7847e7eb905761532200000000000000000000000000000000000000000000000036a46211259ea63c00000000000000000000000000000000000000000000cd7848c6644dcf52ace6", + "blockNumber": "0x19a1804", + "transactionHash": "0x6a5715702ad54a1c01d0b33a3dd34d21bc79cbe816d426f3d99129af0f74319c", + "transactionIndex": "0x2a", + "blockHash": "0xfbd1b500b83180114c4bf1317d980a48b3b5e2a1fdbea7271bf1ed4894edc74b", + "logIndex": "0x76", + "removed": false + } + ], + "blockNumber": "0x19a1804", + "cumulativeGasUsed": "0x3d0880", + "status": "0x1" + }, + "args": [], + "bytecode": "0x60806040523480156200001157600080fd5b50600080546001600160a01b03191633908117909155620000329062000059565b6200003d3362000145565b620000483362000231565b62000053336200031d565b62000409565b6000546001600160a01b03163314620000a8576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620000f2576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b6000546001600160a01b0316331462000194576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620001de576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331462000280576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620002ca576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6000546001600160a01b031633146200036c576040805162461bcd60e51b815260206004820152601f60248201526000805160206200175d833981519152604482015290519081900360640190fd5b6001600160a01b038116620003b6576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b61134480620004196000396000f3fe6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500", + "deployedBytecode": "0x6080604052600436106102295760003560e01c806384e37fbf11610123578063ae0cd299116100ab578063e48603391161006f578063e4860339146107aa578063e990b46c146107dd578063edd0fd7e14610810578063f39c38a014610825578063fe794f931461083a57610233565b8063ae0cd299146106d2578063b3ab15fb14610705578063b7407bf614610738578063cbd6e6c31461074d578063d117f0f21461077757610233565b80639611ad2d116100f25780639611ad2d146106325780639be14283146106475780639fac5d4a1461067a578063a26310061461068f578063a7b61c51146106bd57610233565b806384e37fbf1461053d5780638bb01810146105525780638fca99b2146105ce57806394990bd81461061d57610233565b806339b70e38116101b157806361660c5e1161017557806361660c5e146104d457806361d027b3146104e9578063689589a2146104fe5780636cc1761e146105135780637f70cc921461052857610233565b806339b70e381461046b57806347842663146104805780634cacbb4214610495578063570ca735146104aa5780635aa6e675146104bf57610233565b806315ba56e5116101f857806315ba56e5146103a15780631d1628b3146103c8578063238efcbc146103f25780632ea8f44e146104075780633753c6371461043857610233565b806309ed43c9146102b65780630abb6035146102eb5780630b0fd47e1461031e5780630dfbe91b1461036e57610233565b3661023357600080fd5b6008546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610296576040519150601f19603f3d011682016040523d82523d6000602084013e61029b565b606091505b505090506040513d6000823e8180156102b2573d82f35b3d82fd5b3480156102c257600080fd5b506102e9600480360360208110156102d957600080fd5b50356001600160a01b0316610864565b005b3480156102f757600080fd5b506102e96004803603602081101561030e57600080fd5b50356001600160a01b0316610925565b34801561032a57600080fd5b506103516004803603602081101561034157600080fd5b50356001600160a01b03166109e7565b6040805160ff909316835290151560208301528051918290030190f35b34801561037a57600080fd5b506103516004803603602081101561039157600080fd5b50356001600160a01b0316610a05565b3480156103ad57600080fd5b506103b6610a23565b60408051918252519081900360200190f35b3480156103d457600080fd5b506103b6600480360360208110156103eb57600080fd5b5035610b57565b3480156103fe57600080fd5b506103b6610b69565b34801561041357600080fd5b5061041c610c87565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b506102e96004803603602081101561045b57600080fd5b50356001600160a01b0316610c96565b34801561047757600080fd5b5061041c610d7f565b34801561048c57600080fd5b5061041c610d8e565b3480156104a157600080fd5b5061041c610d9d565b3480156104b657600080fd5b5061041c610dac565b3480156104cb57600080fd5b5061041c610dbb565b3480156104e057600080fd5b5061041c610dca565b3480156104f557600080fd5b5061041c610dd9565b34801561050a57600080fd5b5061041c610de8565b34801561051f57600080fd5b5061041c610df7565b34801561053457600080fd5b5061041c610e06565b34801561054957600080fd5b5061041c610e15565b34801561055e57600080fd5b506105856004803603602081101561057557600080fd5b50356001600160a01b0316610e24565b604080519915158a5297151560208a0152951515888801529315156060880152608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b3480156105da57600080fd5b50610609600480360360408110156105f157600080fd5b506001600160a01b0381358116916020013516610e78565b604080519115158252519081900360200190f35b34801561062957600080fd5b5061041c610e98565b34801561063e57600080fd5b5061041c610ea7565b34801561065357600080fd5b5061041c6004803603602081101561066a57600080fd5b50356001600160a01b0316610eb6565b34801561068657600080fd5b5061041c610ed1565b34801561069b57600080fd5b506106a4610ee0565b6040805192835260208301919091528051918290030190f35b3480156106c957600080fd5b5061041c610ee9565b3480156106de57600080fd5b506102e9600480360360208110156106f557600080fd5b50356001600160a01b0316610ef8565b34801561071157600080fd5b506102e96004803603602081101561072857600080fd5b50356001600160a01b0316610fe1565b34801561074457600080fd5b5061041c6110ca565b34801561075957600080fd5b506103b66004803603602081101561077057600080fd5b50356110d9565b34801561078357600080fd5b506102e96004803603602081101561079a57600080fd5b50356001600160a01b03166110f7565b3480156107b657600080fd5b50610609600480360360208110156107cd57600080fd5b50356001600160a01b03166111e8565b3480156107e957600080fd5b506102e96004803603602081101561080057600080fd5b50356001600160a01b03166111fd565b34801561081c57600080fd5b5061041c6112e6565b34801561083157600080fd5b5061041c6112f5565b34801561084657600080fd5b506103b66004803603602081101561085d57600080fd5b5035611304565b6004546001600160a01b031633146108c3576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600980546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6004546001600160a01b03163314610984576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f1702587929181900390910190a15050565b600c6020526000908152604090205460ff8082169161010090041682565b600d6020526000908152604090205460ff8082169161010090041682565b6009546000906001600160a01b031633148015610a4a57506009546001600160a01b031615155b610a9b576040805162461bcd60e51b815260206004820152601e60248201527f2170656e64696e675265676973747279496d706c656d656e746174696f6e0000604482015290519081900360640190fd5b60088054600980546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600954604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b600b6020526000908152604090205481565b6007546000906001600160a01b031633148015610b8557503315155b610bcb576040805162461bcd60e51b81526020600482015260126024820152712170656e64696e67476f7665726e616e636560701b604482015290519081900360640190fd5b60008054600780546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927f48da34dfe9ebb4198c3f70d8382467788dcee33984c79a74fa850772c4e5e36f92908290030190a1600754604080516001600160a01b038085168252909216602083015280517f0624249fed898b3afc1360fbd5a7665f029603fbdc8824ba2713aba4f17025879281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b03163314610ce3576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610d2c576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fcebe670e32fa7e67739a1eb996a0fa247dec70da938e96fd5b0a5dadd80a93ce90600090a350565b601a546001600160a01b031681565b6018546001600160a01b031681565b6016546001600160a01b031681565b6004546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b6005546001600160a01b031681565b6006546001600160a01b031681565b601e546001600160a01b031681565b601b546001600160a01b031681565b6009546001600160a01b031681565b60106020526000908152604090208054600282015460038301546004840154600585015460069095015460ff8086169661010087048216966201000081048316966301000000909104909216949193919289565b601160209081526000928352604080842090915290825290205460ff1681565b601c546001600160a01b031681565b6003546001600160a01b031681565b600e602052600090815260409020546001600160a01b031681565b601d546001600160a01b031681565b60125460135482565b6019546001600160a01b031681565b6000546001600160a01b03163314610f45576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116610f8e576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fe0b30518e12df67a42f08188523b49c69cbf481de8356250e3cdf8c2aaf7497e90600090a350565b6000546001600160a01b0316331461102e576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611077576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fa3fa0a434ea340b210144ceac453176b4e181b4467d8692e7144a6b0ab4ac07690600090a350565b6017546001600160a01b031681565b601581815481106110e657fe5b600091825260209091200154905081565b6000546001600160a01b03163314611144576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b611156816001600160a01b0316611311565b611195576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907ff7ce03f54d3113e6c232684aee8d4326c04d0d25d0880532d5fe20aff52a385290600090a350565b600a6020526000908152604090205460ff1681565b6000546001600160a01b0316331461124a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611318833981519152604482015290519081900360640190fd5b6001600160a01b038116611293576040805162461bcd60e51b815260206004820152600b60248201526a216164647265737328302960a81b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040513392909116907fbea13b980bfe82b1aba43f1b930ab26252fdea6ef746815f1a17238f1522538090600090a350565b6008546001600160a01b031681565b6007546001600160a01b031681565b601481815481106110e657fe5b3b15159056fe63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500a164736f6c634300060c000a" +} diff --git a/deployments/polygon/RiskManager.json b/deployments/polygon/RiskManager.json new file mode 100644 index 000000000..dadbaa5b9 --- /dev/null +++ b/deployments/polygon/RiskManager.json @@ -0,0 +1,188 @@ +{ + "address": "0xA84F5B259DfEf7eA4c752B8fd7B5E784a9F0B0CF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "contract RiskManagerProxy", + "name": "_riskManagerProxy", + "type": "address" + } + ], + "name": "become", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe2ebdb94a699cd437b34582c929a63742b22deb040fedf3f181400b1979ffc52", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0xA84F5B259DfEf7eA4c752B8fd7B5E784a9F0B0CF", + "transactionIndex": 28, + "gasUsed": "1043442", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000008000001000000000000000008000000000000000000000000000000080000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000080000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x5fe0b43fb8d899d377b7223e12969c5f0b0f7b59b002a7f4967e08bc1a611db3", + "transactionHash": "0xe2ebdb94a699cd437b34582c929a63742b22deb040fedf3f181400b1979ffc52", + "logs": [ + { + "transactionIndex": 28, + "blockNumber": 26876004, + "transactionHash": "0xe2ebdb94a699cd437b34582c929a63742b22deb040fedf3f181400b1979ffc52", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000f0245f6251bef9447a08766b9da2b07b28ad80b0" + ], + "data": "0x00000000000000000000000000000000000000000000000000b95a3f9cd3428400000000000000000000000000000000000000000000000033b78dddb2d5800000000000000000000000000000000000000000000000026167fb219fe9740a5400000000000000000000000000000000000000000000000032fe339e16023d7c00000000000000000000000000000000000000000000026168b47bdf86474cd8", + "logIndex": 116, + "blockHash": "0x5fe0b43fb8d899d377b7223e12969c5f0b0f7b59b002a7f4967e08bc1a611db3" + } + ], + "blockNumber": 26876004, + "cumulativeGasUsed": "5375913", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x608060405234801561001057600080fd5b5060405161120a38038061120a83398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b611179806100916000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638db4fab41161005b5780638db4fab4146100c8578063a1194c8e146100d0578063a64e1e7b146100e5578063a91ee0dc146101055761007d565b8063231921511461008257806328c1f99b146100ab57806343aa3987146100c0575b600080fd5b610095610090366004610d98565b610118565b6040516100a291906110dd565b60405180910390f35b6100b3610226565b6040516100a29190610f31565b6100b3610235565b6100b3610244565b6100e36100de366004610c08565b610253565b005b6100f86100f3366004610f10565b6103a5565b6040516100a29190610f45565b6100e3610113366004610c08565b6103b8565b610120610a5f565b600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561016e57600080fd5b505afa158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610c24565b6001600160a01b031663f4448faf836040518263ffffffff1660e01b81526004016101d19190610fac565b604080518083038186803b1580156101e857600080fd5b505afa1580156101fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102209190610ec5565b92915050565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a157600080fd5b505afa1580156102b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d99190610c24565b6001600160a01b0316336001600160a01b0316146103125760405162461bcd60e51b815260040161030990610fb5565b60405180910390fd5b806001600160a01b03166315ba56e56040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561034d57600080fd5b505af1158015610361573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103859190610ef8565b156103a25760405162461bcd60e51b81526004016103099061100c565b50565b60606103b183836104be565b9392505050565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561040657600080fd5b505afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e9190610c24565b6001600160a01b0316336001600160a01b03161461046e5760405162461bcd60e51b815260040161030990611033565b610480816001600160a01b031661090e565b61049c5760405162461bcd60e51b815260040161030990611094565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600254604051638346525f60e01b815260609182916001600160a01b0390911690638346525f906104f3908690600401610fac565b60006040518083038186803b15801561050b57600080fd5b505afa15801561051f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105479190810190610c40565b9050600081511161056a5760405162461bcd60e51b81526004016103099061106a565b60005b81518110156106315760025482516001600160a01b0390911690632d5ad3d59084908490811061059957fe5b60200260200101516040518263ffffffff1660e01b81526004016105bd9190610f31565b60206040518083038186803b1580156105d557600080fd5b505afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d9190610d7c565b6106295760405162461bcd60e51b815260040161030990610fec565b60010161056d565b5061063a610a79565b600254604051639ec39e2f60e01b81526001600160a01b0390911690639ec39e2f9061066a908890600401610fac565b60006040518083038186803b15801561068257600080fd5b505afa158015610696573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106be9190810190610df7565b905080606001516106e15760405162461bcd60e51b8152600401610309906110b9565b6002546040805163992812b760e01b815290516060926001600160a01b03169163992812b7916004808301926020929190829003018186803b15801561072657600080fd5b505afa15801561073a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075e9190610c24565b6001600160a01b031663d11917d587876040518363ffffffff1660e01b815260040161078b9291906110f4565b60006040518083038186803b1580156107a357600080fd5b505afa1580156107b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107df9190810190610cde565b90508051600014806107f657506107f68183610914565b1561090557600260009054906101000a90046001600160a01b03166001600160a01b031663992812b76040518163ffffffff1660e01b815260040160206040518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190610c24565b6001600160a01b031663f0e182e787876040518363ffffffff1660e01b81526004016108ae9291906110f4565b60006040518083038186803b1580156108c657600080fd5b505afa1580156108da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109029190810190610cde565b90505b95945050505050565b3b151590565b6000805b8351811015610a5557610929610ab1565b60025485516001600160a01b0390911690632ae948639087908590811061094c57fe5b6020026020010151600001516040518263ffffffff1660e01b81526004016109749190610f31565b604080518083038186803b15801561098b57600080fd5b505afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190610db0565b9050600081602001511580610a045750604085015151825160ff918216911610801590610a02575084604001516020015160ff16826000015160ff1611155b155b90508460200151158015610a16575080155b610a205780610a39565b858381518110610a2c57fe5b6020026020010151604001515b90508015610a4b579250610220915050565b5050600101610918565b5060009392505050565b604051806040016040528060008152602001600081525090565b6040805160c08101825260008082526020820152908101610a98610ab1565b8152600060208201526060604082018190529081015290565b604080518082019091526000808252602082015290565b8051801515811461022057600080fd5b600082601f830112610ae8578081fd5b815167ffffffffffffffff811115610afe578182fd5b6020610b12601f8301601f19168201611102565b92508183528481838601011115610b2857600080fd5b60005b82811015610b46578481018201518482018301528101610b2b565b82811115610b575760008284860101525b50505092915050565b600060408284031215610b71578081fd5b610b7b6040611102565b9050610b878383610bf7565b8152610b968360208401610bf7565b602082015292915050565b600060608284031215610bb2578081fd5b610bbc6060611102565b90508151610bc981611149565b81526020820151610bd981611149565b60208201526040820151610bec8161115e565b604082015292915050565b805160ff8116811461022057600080fd5b600060208284031215610c19578081fd5b81356103b181611149565b600060208284031215610c35578081fd5b81516103b181611149565b60006020808385031215610c52578182fd5b825167ffffffffffffffff811115610c68578283fd5b8301601f81018513610c78578283fd5b8051610c8b610c8682611129565b611102565b8181528381019083850185840285018601891015610ca7578687fd5b8694505b83851015610cd2578051610cbe81611149565b835260019490940193918501918501610cab565b50979650505050505050565b60006020808385031215610cf0578182fd5b825167ffffffffffffffff811115610d06578283fd5b8301601f81018513610d16578283fd5b8051610d24610c8682611129565b818152838101908385016060808502860187018a1015610d42578788fd5b8795505b84861015610d6e57610d588a83610ba1565b8452600195909501949286019290810190610d46565b509098975050505050505050565b600060208284031215610d8d578081fd5b81516103b18161115e565b600060208284031215610da9578081fd5b5035919050565b600060408284031215610dc1578081fd5b610dcb6040611102565b825160ff81168114610ddb578283fd5b81526020830151610deb8161115e565b60208201529392505050565b600060208284031215610e08578081fd5b815167ffffffffffffffff80821115610e1f578283fd5b9083019060e08286031215610e32578283fd5b610e3c60c0611102565b82518152610e4d8660208501610ac8565b6020820152610e5f8660408501610b60565b6040820152610e718660808501610ac8565b606082015260a083015182811115610e87578485fd5b610e9387828601610ad8565b60808301525060c083015182811115610eaa578485fd5b610eb687828601610ad8565b60a08301525095945050505050565b600060408284031215610ed6578081fd5b610ee06040611102565b82518152602083015160208201528091505092915050565b600060208284031215610f09578081fd5b5051919050565b60008060408385031215610f22578081fd5b50508035926020909101359150565b6001600160a01b0391909116815260200190565b602080825282518282018190526000919060409081850190868401855b82811015610f9f57815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610f62565b5091979650505050505050565b90815260200190565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526006908201526510aa37b5b2b760d11b604082015260600190565b6020808252600d908201526c085d5b985d5d1a1bdc9a5e9959609a1b604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526010908201526f21546f6b656e4861736845786973747360801b604082015260600190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b6020808252600a90820152692152705f45786973747360b01b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561112157600080fd5b604052919050565b600067ffffffffffffffff82111561113f578081fd5b5060209081020190565b6001600160a01b03811681146103a257600080fd5b80151581146103a257600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/polygon/RiskManagerProxy.json b/deployments/polygon/RiskManagerProxy.json new file mode 100644 index 000000000..379ff4c03 --- /dev/null +++ b/deployments/polygon/RiskManagerProxy.json @@ -0,0 +1,175 @@ +{ + "address": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingRiskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "riskManagerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "setPendingImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x35e18eaa08253ef2e7e42339917d4f0aa9a28c0c64562bd56e87a31f606e67cb", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x4bd545F438A73E4d9dBC0C29ca6Dfa6522F95B48", + "transactionIndex": 22, + "gasUsed": "398206", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000008000001000000000000000008000000000000000000000000000000080000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000080000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000002000100000", + "blockHash": "0x7365c81d9da15d9b656039726ef4e598115b5c61ac74032431578f83b5bafd84", + "transactionHash": "0x35e18eaa08253ef2e7e42339917d4f0aa9a28c0c64562bd56e87a31f606e67cb", + "logs": [ + { + "transactionIndex": 22, + "blockNumber": 26876000, + "transactionHash": "0x35e18eaa08253ef2e7e42339917d4f0aa9a28c0c64562bd56e87a31f606e67cb", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000f0245f6251bef9447a08766b9da2b07b28ad80b0" + ], + "data": "0x0000000000000000000000000000000000000000000000000046bc4ff5a3226800000000000000000000000000000000000000000000000033fe4a2da9b498000000000000000000000000000000000000000000000002613760e45db3d9a8d100000000000000000000000000000000000000000000000033b78dddb411759800000000000000000000000000000000000000000000026137a7a0ada97ccb39", + "logIndex": 72, + "blockHash": "0x7365c81d9da15d9b656039726ef4e598115b5c61ac74032431578f83b5bafd84" + } + ], + "blockNumber": 26876000, + "cumulativeGasUsed": "3509646", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x608060405234801561001057600080fd5b506040516106333803806106338339818101604052602081101561003357600080fd5b5051600280546001600160a01b0319166001600160a01b039092169190911790556105d0806100636000396000f3fe6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a", + "deployedBytecode": "0x6080604052600436106100595760003560e01c806309ed43c9146100e657806315ba56e51461011b57806328c1f99b1461014257806343aa3987146101735780638db4fab414610188578063a91ee0dc1461019d57610063565b3661006357600080fd5b600080546040516001600160a01b0390911690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100c6576040519150601f19603f3d011682016040523d82523d6000602084013e6100cb565b606091505b505090506040513d6000823e8180156100e2573d82f35b3d82fd5b3480156100f257600080fd5b506101196004803603602081101561010957600080fd5b50356001600160a01b03166101d0565b005b34801561012757600080fd5b50610130610308565b60408051918252519081900360200190f35b34801561014e57600080fd5b50610157610426565b604080516001600160a01b039092168252519081900360200190f35b34801561017f57600080fd5b50610157610435565b34801561019457600080fd5b50610157610444565b3480156101a957600080fd5b50610119600480360360208110156101c057600080fd5b50356001600160a01b0316610453565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561021e57600080fd5b505afa158015610232573d6000803e3d6000fd5b505050506040513d602081101561024857600080fd5b50516001600160a01b031633146102a6576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a15050565b6001546000906001600160a01b03163314801561032f57506001546001600160a01b031615155b61036a5760405162461bcd60e51b81526004018080602001828103825260218152602001806105a36021913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160009250505090565b6002546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031681565b600260009054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156104a157600080fd5b505afa1580156104b5573d6000803e3d6000fd5b505050506040513d60208110156104cb57600080fd5b50516001600160a01b03163314610529576040805162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604482015290519081900360640190fd5b61053b816001600160a01b031661059c565b61057a576040805162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b3b15159056fe2170656e64696e675269736b4d616e61676572496d706c656d656e746174696f6ea164736f6c634300060c000a" +} diff --git a/deployments/polygon/StrategyProvider.json b/deployments/polygon/StrategyProvider.json new file mode 100644 index 000000000..299fb999a --- /dev/null +++ b/deployments/polygon/StrategyProvider.json @@ -0,0 +1,420 @@ +{ + "address": "0x3BE190258C362c979E7fF64679BD8bAF3c5d0969", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToBestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "getRpToTokenToDefaultStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + } + ], + "name": "getVaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToBestStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rpToTokenToDefaultStrategy", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestDefaultStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_strategySteps", + "type": "tuple[]" + } + ], + "name": "setBestStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultRewardTokenHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "_vaultRewardStrategy", + "type": "tuple" + } + ], + "name": "setVaultRewardStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "internalType": "struct DataTypes.VaultRewardStrategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "vaultRewardTokenHashToVaultRewardTokenStrategy", + "outputs": [ + { + "internalType": "uint256", + "name": "hold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "convert", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xf416669e927e857c5094894eb6a14935417dd33a3215d3ba461bff1e37a0cf9c", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3BE190258C362c979E7fF64679BD8bAF3c5d0969", + "transactionIndex": 20, + "gasUsed": "797383", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0x403e9b9187fbdf583c8199b28c30efb7e8cea6a5b7fce5dab0be7b331e978a48", + "transactionHash": "0xf416669e927e857c5094894eb6a14935417dd33a3215d3ba461bff1e37a0cf9c", + "logs": [ + { + "transactionIndex": 20, + "blockNumber": 26876044, + "transactionHash": "0xf416669e927e857c5094894eb6a14935417dd33a3215d3ba461bff1e37a0cf9c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x000000000000000000000000000000000000000000000000008da4c7d903517700000000000000000000000000000000000000000000000032de8e10e8a65c000000000000000000000000000000000000000000000005a57a4793d6797b822a0000000000000000000000000000000000000000000000003250e9490fa30a890000000000000000000000000000000000000000000005a57ad5389e527ed3a1", + "logIndex": 72, + "blockHash": "0x403e9b9187fbdf583c8199b28c30efb7e8cea6a5b7fce5dab0be7b331e978a48" + } + ], + "blockNumber": 26876044, + "cumulativeGasUsed": "3331984", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x608060405234801561001057600080fd5b50604051610d96380380610d9683398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610d05806100916000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a91ee0dc11610071578063a91ee0dc14610144578063b06eed5e14610157578063d11917d51461016a578063e914aac51461018a578063f0e182e71461019d578063f4448faf146101b0576100a9565b80631ae5c8cb146100ae57806328c1f99b146100d95780632f5fa900146100ee5780632f647a2314610103578063373b9a8a14610124575b600080fd5b6100c16100bc366004610b2f565b6101c3565b6040516100d093929190610b5a565b60405180910390f35b6100e1610221565b6040516100d09190610be5565b6101016100fc366004610a6e565b610230565b005b6101166101113660046109e6565b6103bc565b6040516100d0929190610cae565b6101376101323660046109fe565b6103d5565b6040516100d09190610c97565b6101016101523660046109a7565b6104c6565b610101610165366004610a6e565b6105ca565b61017d610178366004610a4d565b610747565b6040516100d09190610b7e565b6100c1610198366004610b2f565b6107e9565b61017d6101ab366004610a4d565b61080e565b6101376101be3660046109e6565b6108a1565b600260205282600052604060002060205281600052604060002081815481106101e857fe5b6000918252602090912060029091020180546001909101546001600160a01b0391821694509081169250600160a01b900460ff16905083565b6000546001600160a01b031681565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b491906109ca565b6001600160a01b0316336001600160a01b0316146102ed5760405162461bcd60e51b81526004016102e490610c30565b60405180910390fd5b6000838152600260209081526040808320858452909152812061030f916108d9565b60005b81518110156103b65760008481526002602090815260408083208684529091529020825183908390811061034257fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b9115159190910217905501610312565b50505050565b6003602052600090815260409020805460019091015482565b6103dd6108fd565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561042957600080fd5b505afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046191906109ca565b6001600160a01b0316336001600160a01b0316146104915760405162461bcd60e51b81526004016102e490610c30565b508051600092835260036020908152604093849020828155928101516001909301839055835180850190945290835282015290565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b15801561051257600080fd5b505afa158015610526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054a91906109ca565b6001600160a01b0316336001600160a01b03161461057a5760405162461bcd60e51b81526004016102e490610bf9565b61058c816001600160a01b03166108d3565b6105a85760405162461bcd60e51b81526004016102e490610c72565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663fabee0e66040518163ffffffff1660e01b815260040160206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906109ca565b6001600160a01b0316336001600160a01b03161461067e5760405162461bcd60e51b81526004016102e490610c30565b600083815260016020908152604080832085845290915281206106a0916108d9565b60005b81518110156103b6576000848152600160209081526040808320868452909152902082518390839081106106d357fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016106a3565b60008281526001602090815260408083208484528252808320805482518185028101850190935280835260609492939192909184015b828210156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b50505050905092915050565b600160205282600052604060002060205281600052604060002081815481106101e857fe5b600082815260026020908152604080832084845282528083208054825181850281018501909352808352606094929391929091840182156107dd576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161077d565b6108a96108fd565b50600090815260036020908152604091829020825180840190935280548352600101549082015290565b3b151590565b50805460008255600202906000526020600020908101906108fa9190610917565b50565b604051806040016040528060008152602001600081525090565b5b808211156109485780546001600160a01b03191681556001810180546001600160a81b0319169055600201610918565b5090565b60006060828403121561095d578081fd5b6109676060610cbc565b9050813561097481610ce3565b8152602082013561098481610ce3565b60208201526040820135801515811461099c57600080fd5b604082015292915050565b6000602082840312156109b8578081fd5b81356109c381610ce3565b9392505050565b6000602082840312156109db578081fd5b81516109c381610ce3565b6000602082840312156109f7578081fd5b5035919050565b6000808284036060811215610a11578182fd5b833592506040601f1982011215610a26578182fd5b50610a316040610cbc565b6020840135815260408401356020820152809150509250929050565b60008060408385031215610a5f578182fd5b50508035926020909101359150565b60008060006060808587031215610a83578182fd5b843593506020808601359350604086013567ffffffffffffffff80821115610aa9578485fd5b818801915088601f830112610abc578485fd5b813581811115610aca578586fd5b610ad78485830201610cbc565b8181528481019250838501868302850186018c1015610af4578788fd5b8794505b82851015610b1e57610b0a8c8261094c565b845260019490940193928501928601610af8565b508096505050505050509250925092565b600080600060608486031215610b43578283fd5b505081359360208301359350604090920135919050565b6001600160a01b039384168152919092166020820152901515604082015260600190565b602080825282518282018190526000919060409081850190868401855b82811015610bd857815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101610b9b565b5091979650505050505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b60208082526022908201527f63616c6c6572206973206e6f74207468652073747261746567794f706572617460408201526137b960f11b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b815181526020918201519181019190915260400190565b918252602082015260400190565b60405181810167ffffffffffffffff81118282101715610cdb57600080fd5b604052919050565b6001600160a01b03811681146108fa57600080fdfea164736f6c634300060c000a" +} diff --git a/deployments/polygon/SushiswapPoolAdapter.json b/deployments/polygon/SushiswapPoolAdapter.json new file mode 100644 index 000000000..70acf1597 --- /dev/null +++ b/deployments/polygon/SushiswapPoolAdapter.json @@ -0,0 +1,748 @@ +{ + "address": "0x72aba46f25C4c270d20c575D023627B45E307446", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositAmount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositPoolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositPoolPct", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum MaxExposure", + "name": "maxDepositProtocolMode", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolMode", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "maxDepositProtocolPct", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMaxDepositProtocolPct", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "calculateAmountInLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "calculateRedeemableLPTokenAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "canStake", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getAllAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getDepositAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDepositSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getLiquidityPoolTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + } + ], + "name": "getPoolValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_liquidityPoolTokenAmount", + "type": "uint256" + } + ], + "name": "getSomeAmountInToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "getUnderlyingTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "_underlyingTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + } + ], + "name": "getWithdrawAllCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "getWithdrawSomeCodes", + "outputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_vault", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_redeemAmount", + "type": "uint256" + } + ], + "name": "isRedeemableAmountSufficient", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDepositPoolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolMode", + "outputs": [ + { + "internalType": "enum MaxExposure", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDepositProtocolPct", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IAdapterRegistryBase", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_underlyingToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "setMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_liquidityPool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxDepositPoolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositPoolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum MaxExposure", + "name": "_mode", + "type": "uint8" + } + ], + "name": "setMaxDepositProtocolMode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositProtocolPct", + "type": "uint256" + } + ], + "name": "setMaxDepositProtocolPct", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sushiswapFactory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sushiswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6749f4f90016bbd5ab58731c0d32093ceea864e886bd8a28d20452b60533341a", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x72aba46f25C4c270d20c575D023627B45E307446", + "transactionIndex": 18, + "gasUsed": "2262515", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0xfc1dac689de57b6638e112aac34297f2aa3fe040943adb0ba4e73f8dfe802f7b", + "transactionHash": "0x6749f4f90016bbd5ab58731c0d32093ceea864e886bd8a28d20452b60533341a", + "logs": [ + { + "transactionIndex": 18, + "blockNumber": 26876067, + "transactionHash": "0x6749f4f90016bbd5ab58731c0d32093ceea864e886bd8a28d20452b60533341a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x0000000000000000000000000000000000000000000000000191e7452c768d380000000000000000000000000000000000000000000000002bbea3722e0b08000000000000000000000000000000000000000000000005a6784d56300481cb990000000000000000000000000000000000000000000000002a2cbc2d01947ac80000000000000000000000000000000000000000000005a679df3d7530f858d1", + "logIndex": 74, + "blockHash": "0xfc1dac689de57b6638e112aac34297f2aa3fe040943adb0ba4e73f8dfe802f7b" + } + ], + "blockNumber": 26876067, + "cumulativeGasUsed": "5000799", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c"], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620027673803806200276783398101604081905262000034916200006f565b600080546001600160a01b0319166001600160a01b038316179055612710600355600480546001919060ff19168280021790555050620000a1565b6000602082840312156200008257600080fd5b81516001600160a01b03811681146200009a57600080fd5b9392505050565b6126b680620000b16000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806385541e44116100f9578063df93572211610097578063ee665bed11610071578063ee665bed146103ff578063ef856be914610412578063f1aacbb714610432578063f49307ca1461044557600080fd5b8063df935722146103be578063e49d5ecc146103d1578063e9240c2d146103e457600080fd5b8063919b69d7116100d3578063919b69d714610372578063a91ee0dc14610385578063d74baaf814610398578063da699f96146103ab57600080fd5b806385541e441461034357806390e6160514610356578063918f86741461036957600080fd5b80634ad36e0211610166578063609257791161014057806360925779146102fa57806364dd5f801461030d57806377078872146103205780637c47b3f41461032e57600080fd5b80634ad36e02146102ac5780634f83b52d146102bf578063501070be146102df57600080fd5b80632af06b96116101a25780632af06b961461023b5780632de778381461025557806336d8bf9314610268578063489b52951461028c57600080fd5b8063027a304d146101c9578063191c194b1461020757806328c1f99b14610210575b600080fd5b6101f46101d73660046121bc565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6101f460035481565b600054610223906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b6004546102489060ff1681565b6040516101fe919061220b565b6101f46102633660046121bc565b610458565b61027c610276366004612233565b50600090565b60405190151581526020016101fe565b61029f61029a366004612250565b6104d8565b6040516101fe91906122e8565b6101f46102ba36600461234a565b61055f565b6101f46102cd366004612233565b60026020526000908152604090205481565b61022373c35dadb65012ec5796536bd9864ed8773abc74c481565b61029f61030836600461234a565b6105ab565b6101f461031b366004612250565b610ba3565b610223610276366004612233565b61034161033c36600461239b565b610bb5565b005b6101f46103513660046123bc565b610cc5565b6101f4610364366004612250565b610e94565b6101f461271081565b6103416103803660046123fd565b610f02565b610341610393366004612233565b610ff0565b6102236103a63660046121bc565b919050565b6103416103b9366004612429565b61112c565b61029f6103cc36600461234a565b611206565b61027c6103df36600461234a565b611810565b610223731b02da8cb0d097eb8d57a175b88c7d8b4799750681565b6101f461040d3660046123bc565b61182b565b6104256104203660046121bc565b6119a1565b6040516101fe9190612486565b6103416104403660046123bc565b611af1565b61029f610453366004612250565b611bef565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612499565b6104d19060026124c8565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105489190612499565b905061055685858584611206565b95945050505050565b60008061056d868686610e94565b9050600061057c878787610ba3565b90508061058985846124c8565b61059391906124e7565b61059e906001612509565b925050505b949350505050565b606081156105a35760408051600680825260e0820190925290816020015b60608152602001906001900390816105c957905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064393929101612521565b6040516020818303038152906040528160008151811061066557610665612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d293929101612521565b604051602081830303815290604052816001815181106106f4576106f4612545565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610763919061255b565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ca919061258f565b506001600160701b031691506001600160701b0316915060006107ee878484611c0c565b9050806107fb87856124c8565b61080591906124e7565b92508061081287846124c8565b61081c91906124e7565b9150876001600160a01b0316846001600160a01b031614156108a057866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089a919061255b565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e4820152731b02da8cb0d097eb8d57a175b88c7d8b47997506906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093293929101612521565b6040516020818303038152906040528560028151811061095457610954612545565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b693929101612521565b604051602081830303815290604052856003815181106109d8576109d8612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4593929101612521565b60405160208183030381529060405285600481518110610a6757610a67612545565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aab57610aab612545565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610adf57610adf612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838d600019604051602401610b309594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6993929101612521565b60405160208183030381529060405286600581518110610b8b57610b8b612545565b60200260200101819052505050505050949350505050565b60006105a3838361040d878787610e94565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2a919061255b565b6001600160a01b0316336001600160a01b031614610c635760405162461bcd60e51b8152600401610c5a90612613565b60405180910390fd5b6004805482919060ff191660018381811115610c8157610c816121f5565b021790555033816001811115610c9957610c996121f5565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061258f565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf919061255b565b6001600160a01b031614610dbf57905b6000610dcb8386611df7565b90506000610dda828585611e4d565b9050610de68285612509565b9350610df2818461264a565b92506000610e01888686611c0c565b90506000610e0f848961264a565b90506000610e1e828888611f2c565b905083811115610e38575082610e35818789611f2c565b91505b600087610e4585856124c8565b610e4f91906124e7565b905086610e5c85846124c8565b610e6691906124e7565b811115610e855786610e7885846124c8565b610e8291906124e7565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a39190612499565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f77919061255b565b6001600160a01b0316336001600160a01b031614610fa75760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611065919061255b565b6001600160a01b0316336001600160a01b0316146110c55760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c5a565b6001600160a01b0381163b61110a5760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c5a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a1919061255b565b6001600160a01b0316336001600160a01b0316146111d15760405162461bcd60e51b8152600401610c5a90612613565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611213848484611fcc565b915081156105a35760408051600680825260e0820190925290816020015b606081526020019060019003908161123157905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112ab93929101612521565b604051602081830303815290604052816000815181106112cd576112cd612545565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061258f565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb919061255b565b9450886001600160a01b0316856001600160a01b031614156114465760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611443919061255b565b94505b6114508288611df7565b935061145d848383611e4d565b604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c593929101612521565b604051602081830303815290604052846001815181106114e7576114e7612545565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152b5761152b612545565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155f5761155f612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838c6000196040516024016115b09594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e993929101612521565b6040516020818303038152906040528560028151811061160b5761160b612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167893929101612521565b6040516020818303038152906040528560038151811061169a5761169a612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170793929101612521565b6040516020818303038152906040528560048151811061172957611729612545565b6020908102919091010152731b02da8cb0d097eb8d57a175b88c7d8b479975068885611755868a61264a565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d793929101612521565b604051602081830303815290604052856005815181106117f9576117f9612545565b602002602001018190525050505050949350505050565b60008061181e868686610ba3565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611892919061258f565b506001600160701b031691506001600160701b0316915060006118b6868484611c0c565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611900573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611924919061255b565b6001600160a01b031614611936579091905b60008161194387866124c8565b61194d91906124e7565b905060008261195c88866124c8565b61196691906124e7565b9050600061198782611978818861264a565b611982868a61264a565b611e4d565b90506119938184612509565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a23919061255b565b81600081518110611a3657611a36612545565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab8919061255b565b81600181518110611acb57611acb612545565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b66919061255b565b6001600160a01b0316336001600160a01b031614611b965760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfe858585610e94565b9050610556858585846105ab565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c709190612499565b905060006001600160a01b031673c35dadb65012ec5796536bd9864ed8773abc74c46001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf3919061255b565b6001600160a01b0316146104d1576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190612499565b90508015611def576000611d81611d7c85876124c8565b612135565b90506000611d8e83612135565b905080821115611dec576000611da4828461264a565b611dae90866124c8565b9050600082611dbe8560056124c8565b611dc89190612509565b90506000611dd682846124e7565b90508015611de8576119938188612509565b5050505b50505b509392505050565b60006107ca611e08846107cd6124c8565b611e39611e1886623cda296124c8565b611e2586623cda206124c8565b611e2f9190612509565b611d7c90876124c8565b611e43919061264a565b6104d191906124e7565b6000808411611eb25760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c5a565b600083118015611ec25750600082115b611ede5760405162461bcd60e51b8152600401610c5a90612661565b6000611eec856103e56124c8565b90506000611efa84836124c8565b9050600082611f0b876103e86124c8565b611f159190612509565b9050611f2181836124e7565b979650505050505050565b6000808411611f8b5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c5a565b600083118015611f9b5750600082115b611fb75760405162461bcd60e51b8152600401610c5a90612661565b82611fc283866124c8565b6105a391906124e7565b60008060045460ff166001811115611fe657611fe66121f5565b141561204c576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204557506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d1565b50806104d1565b60006120588486610458565b6001600160a01b038516600090815260026020526040902054909150156120f1576001600160a01b038416600090815260026020526040902054612710906120a090836124c8565b6120aa91906124e7565b8311156120e9576001600160a01b038416600090815260026020526040902054612710906120d890836124c8565b6120e291906124e7565b9150611def565b829150611def565b60035415611def576127106003548261210a91906124c8565b61211491906124e7565b83111561212c57612710600354826120d891906124c8565b50909392505050565b60006003821115612196575080600061214f6002836124e7565b61215a906001612509565b90505b818110156121905790508060028161217581866124e7565b61217f9190612509565b61218991906124e7565b905061215d565b50919050565b81156103a657506001919050565b6001600160a01b03811681146121b957600080fd5b50565b600080604083850312156121cf57600080fd5b82356121da816121a4565b915060208301356121ea816121a4565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224557600080fd5b81356104d1816121a4565b60008060006060848603121561226557600080fd5b8335612270816121a4565b92506020840135612280816121a4565b91506040840135612290816121a4565b809150509250925092565b6000815180845260005b818110156122c1576020818501810151868301820152016122a5565b818111156122d3576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233d57603f1988860301845261232b85835161229b565b9450928501929085019060010161230f565b5092979650505050505050565b6000806000806080858703121561236057600080fd5b843561236b816121a4565b9350602085013561237b816121a4565b9250604085013561238b816121a4565b9396929550929360600135925050565b6000602082840312156123ad57600080fd5b8135600281106104d157600080fd5b6000806000606084860312156123d157600080fd5b83356123dc816121a4565b925060208401356123ec816121a4565b929592945050506040919091013590565b6000806040838503121561241057600080fd5b823561241b816121a4565b946020939093013593505050565b60006020828403121561243b57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247b5781516001600160a01b031687529582019590820190600101612456565b509495945050505050565b6020815260006104d16020830184612442565b6000602082840312156124ab57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e2576124e26124b2565b500290565b60008261250457634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251c5761251c6124b2565b500190565b6001600160a01b03831681526040602082018190526000906105a39083018461229b565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256d57600080fd5b81516104d1816121a4565b80516001600160701b03811681146103a657600080fd5b6000806000606084860312156125a457600080fd5b6125ad84612578565b92506125bb60208501612578565b9150604084015163ffffffff8116811461229057600080fd5b85815260ff8516602082015260a0604082015260006125f660a0830186612442565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265c5761265c6124b2565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806385541e44116100f9578063df93572211610097578063ee665bed11610071578063ee665bed146103ff578063ef856be914610412578063f1aacbb714610432578063f49307ca1461044557600080fd5b8063df935722146103be578063e49d5ecc146103d1578063e9240c2d146103e457600080fd5b8063919b69d7116100d3578063919b69d714610372578063a91ee0dc14610385578063d74baaf814610398578063da699f96146103ab57600080fd5b806385541e441461034357806390e6160514610356578063918f86741461036957600080fd5b80634ad36e0211610166578063609257791161014057806360925779146102fa57806364dd5f801461030d57806377078872146103205780637c47b3f41461032e57600080fd5b80634ad36e02146102ac5780634f83b52d146102bf578063501070be146102df57600080fd5b80632af06b96116101a25780632af06b961461023b5780632de778381461025557806336d8bf9314610268578063489b52951461028c57600080fd5b8063027a304d146101c9578063191c194b1461020757806328c1f99b14610210575b600080fd5b6101f46101d73660046121bc565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6101f460035481565b600054610223906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b6004546102489060ff1681565b6040516101fe919061220b565b6101f46102633660046121bc565b610458565b61027c610276366004612233565b50600090565b60405190151581526020016101fe565b61029f61029a366004612250565b6104d8565b6040516101fe91906122e8565b6101f46102ba36600461234a565b61055f565b6101f46102cd366004612233565b60026020526000908152604090205481565b61022373c35dadb65012ec5796536bd9864ed8773abc74c481565b61029f61030836600461234a565b6105ab565b6101f461031b366004612250565b610ba3565b610223610276366004612233565b61034161033c36600461239b565b610bb5565b005b6101f46103513660046123bc565b610cc5565b6101f4610364366004612250565b610e94565b6101f461271081565b6103416103803660046123fd565b610f02565b610341610393366004612233565b610ff0565b6102236103a63660046121bc565b919050565b6103416103b9366004612429565b61112c565b61029f6103cc36600461234a565b611206565b61027c6103df36600461234a565b611810565b610223731b02da8cb0d097eb8d57a175b88c7d8b4799750681565b6101f461040d3660046123bc565b61182b565b6104256104203660046121bc565b6119a1565b6040516101fe9190612486565b6103416104403660046123bc565b611af1565b61029f610453366004612250565b611bef565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908316906370a0823190602401602060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190612499565b6104d19060026124c8565b9392505050565b6040516370a0823160e01b81526001600160a01b0384811660048301526060916000918516906370a0823190602401602060405180830381865afa158015610524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105489190612499565b905061055685858584611206565b95945050505050565b60008061056d868686610e94565b9050600061057c878787610ba3565b90508061058985846124c8565b61059391906124e7565b61059e906001612509565b925050505b949350505050565b606081156105a35760408051600680825260e0820190925290816020015b60608152602001906001900390816105c957905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161064393929101612521565b6040516020818303038152906040528160008151811061066557610665612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052839060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516106d293929101612521565b604051602081830303815290604052816001815181106106f4576106f4612545565b60200260200101819052506000836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610763919061255b565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ca919061258f565b506001600160701b031691506001600160701b0316915060006107ee878484611c0c565b9050806107fb87856124c8565b61080591906124e7565b92508061081287846124c8565b61081c91906124e7565b9150876001600160a01b0316846001600160a01b031614156108a057866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089a919061255b565b93509091905b6040516001600160a01b03808a16602483015280861660448301526064820188905260006084830181905260a48301528a1660c482015260001960e4820152731b02da8cb0d097eb8d57a175b88c7d8b47997506906101040160408051601f19818403018152918152602080830180516001600160e01b0316635d5155ef60e11b179052905161093293929101612521565b6040516020818303038152906040528560028151811061095457610954612545565b60209081029190910101526040516001600160a01b038816602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516109b693929101612521565b604051602081830303815290604052856003815181106109d8576109d8612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b1790529051610a4593929101612521565b60405160208183030381529060405285600481518110610a6757610a67612545565b6020908102919091010152604080516002808252606082019092526000918160200160208202803683370190505090508481600081518110610aab57610aab612545565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600181518110610adf57610adf612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838d600019604051602401610b309594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b1790529051610b6993929101612521565b60405160208183030381529060405286600581518110610b8b57610b8b612545565b60200260200101819052505050505050949350505050565b60006105a3838361040d878787610e94565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2a919061255b565b6001600160a01b0316336001600160a01b031614610c635760405162461bcd60e51b8152600401610c5a90612613565b60405180910390fd5b6004805482919060ff191660018381811115610c8157610c816121f5565b021790555033816001811115610c9957610c996121f5565b6040517f68e3b01155b193b02181f2c0ed491c934a74348d211ff023f8fc6ac5edf22aa090600090a350565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061258f565b506001600160701b031691506001600160701b03169150856001600160a01b0316856001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daf919061255b565b6001600160a01b031614610dbf57905b6000610dcb8386611df7565b90506000610dda828585611e4d565b9050610de68285612509565b9350610df2818461264a565b92506000610e01888686611c0c565b90506000610e0f848961264a565b90506000610e1e828888611f2c565b905083811115610e38575082610e35818789611f2c565b91505b600087610e4585856124c8565b610e4f91906124e7565b905086610e5c85846124c8565b610e6691906124e7565b811115610e855786610e7885846124c8565b610e8291906124e7565b90505b9b9a5050505050505050505050565b6040516370a0823160e01b81526001600160a01b038481166004830152600091908316906370a0823190602401602060405180830381865afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a39190612499565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f77919061255b565b6001600160a01b0316336001600160a01b031614610fa75760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03821660009081526002602052604080822083905551339183917fac58e29a41d996caca756d050dce90806b277f0c939337653638329247e16f4c9190a35050565b60008054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611065919061255b565b6001600160a01b0316336001600160a01b0316146110c55760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610c5a565b6001600160a01b0381163b61110a5760405162461bcd60e51b815260206004820152600b60248201526a085a5cd0dbdb9d1c9858dd60aa1b6044820152606401610c5a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa15801561117d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a1919061255b565b6001600160a01b0316336001600160a01b0316146111d15760405162461bcd60e51b8152600401610c5a90612613565b6003819055604051339082907f19c60b0612798cc65bd298cd47e17d9fd07e74e0d3baa6c0019411bb334d9bda90600090a350565b6060611213848484611fcc565b915081156105a35760408051600680825260e0820190925290816020015b606081526020019060019003908161123157905050604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152909150849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516112ab93929101612521565b604051602081830303815290604052816000815181106112cd576112cd612545565b60200260200101819052506000806000806000876001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061258f565b506001600160701b031691506001600160701b03169150876001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb919061255b565b9450886001600160a01b0316856001600160a01b031614156114465760408051630dfe168160e01b815290519192916001600160a01b038a1691630dfe16819160048083019260209291908290030181865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611443919061255b565b94505b6114508288611df7565b935061145d848383611e4d565b604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101899052909350899250606401905060408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b17905290516114c593929101612521565b604051602081830303815290604052846001815181106114e7576114e7612545565b602090810291909101015260408051600280825260608201909252600091816020016020820280368337019050509050878160008151811061152b5761152b612545565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061155f5761155f612545565b60200260200101906001600160a01b031690816001600160a01b031681525050731b02da8cb0d097eb8d57a175b88c7d8b47997506836000838c6000196040516024016115b09594939291906125d4565b60408051601f19818403018152918152602080830180516001600160e01b03166338ed173960e01b17905290516115e993929101612521565b6040516020818303038152906040528560028151811061160b5761160b612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260006044820152849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161167893929101612521565b6040516020818303038152906040528560038151811061169a5761169a612545565b6020908102919091010152604051731b02da8cb0d097eb8d57a175b88c7d8b47997506602482015260448101839052849060640160408051601f19818403018152918152602080830180516001600160e01b031663095ea7b360e01b179052905161170793929101612521565b6040516020818303038152906040528560048151811061172957611729612545565b6020908102919091010152731b02da8cb0d097eb8d57a175b88c7d8b479975068885611755868a61264a565b6040516001600160a01b0393841660248201529183166044830152606482015260848101859052600060a4820181905260c4820152908b1660e48201526000196101048201526101240160408051601f19818403018152918152602080830180516001600160e01b031662e8e33760e81b17905290516117d793929101612521565b604051602081830303815290604052856005815181106117f9576117f9612545565b602002602001018190525050505050949350505050565b60008061181e868686610ba3565b9092111595945050505050565b6000806000846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561186e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611892919061258f565b506001600160701b031691506001600160701b0316915060006118b6868484611c0c565b9050866001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611900573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611924919061255b565b6001600160a01b031614611936579091905b60008161194387866124c8565b61194d91906124e7565b905060008261195c88866124c8565b61196691906124e7565b9050600061198782611978818861264a565b611982868a61264a565b611e4d565b90506119938184612509565b9a9950505050505050505050565b6040805160028082526060808301845292602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a23919061255b565b81600081518110611a3657611a36612545565b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab8919061255b565b81600181518110611acb57611acb612545565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637af0e5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b66919061255b565b6001600160a01b0316336001600160a01b031614611b965760405162461bcd60e51b8152600401610c5a90612613565b6001600160a01b03808416600090815260016020908152604080832093861683529290528181208390559051339183917f197807a6a2633dd9bde6550aca985cfc69e655e9130930314c0e9da01a75cc549190a3505050565b60606000611bfe858585610e94565b9050610556858585846105ab565b6000836001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c709190612499565b905060006001600160a01b031673c35dadb65012ec5796536bd9864ed8773abc74c46001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf3919061255b565b6001600160a01b0316146104d1576000846001600160a01b0316637464fc3d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190612499565b90508015611def576000611d81611d7c85876124c8565b612135565b90506000611d8e83612135565b905080821115611dec576000611da4828461264a565b611dae90866124c8565b9050600082611dbe8560056124c8565b611dc89190612509565b90506000611dd682846124e7565b90508015611de8576119938188612509565b5050505b50505b509392505050565b60006107ca611e08846107cd6124c8565b611e39611e1886623cda296124c8565b611e2586623cda206124c8565b611e2f9190612509565b611d7c90876124c8565b611e43919061264a565b6104d191906124e7565b6000808411611eb25760405162461bcd60e51b815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201526a1394155517d05353d5539560aa1b6064820152608401610c5a565b600083118015611ec25750600082115b611ede5760405162461bcd60e51b8152600401610c5a90612661565b6000611eec856103e56124c8565b90506000611efa84836124c8565b9050600082611f0b876103e86124c8565b611f159190612509565b9050611f2181836124e7565b979650505050505050565b6000808411611f8b5760405162461bcd60e51b815260206004820152602560248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f416044820152641353d5539560da1b6064820152608401610c5a565b600083118015611f9b5750600082115b611fb75760405162461bcd60e51b8152600401610c5a90612661565b82611fc283866124c8565b6105a391906124e7565b60008060045460ff166001811115611fe657611fe66121f5565b141561204c576001600160a01b0380841660009081526001602090815260408083209388168352929052205482111561204557506001600160a01b038083166000908152600160209081526040808320938716835292905220546104d1565b50806104d1565b60006120588486610458565b6001600160a01b038516600090815260026020526040902054909150156120f1576001600160a01b038416600090815260026020526040902054612710906120a090836124c8565b6120aa91906124e7565b8311156120e9576001600160a01b038416600090815260026020526040902054612710906120d890836124c8565b6120e291906124e7565b9150611def565b829150611def565b60035415611def576127106003548261210a91906124c8565b61211491906124e7565b83111561212c57612710600354826120d891906124c8565b50909392505050565b60006003821115612196575080600061214f6002836124e7565b61215a906001612509565b90505b818110156121905790508060028161217581866124e7565b61217f9190612509565b61218991906124e7565b905061215d565b50919050565b81156103a657506001919050565b6001600160a01b03811681146121b957600080fd5b50565b600080604083850312156121cf57600080fd5b82356121da816121a4565b915060208301356121ea816121a4565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016002831061222d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020828403121561224557600080fd5b81356104d1816121a4565b60008060006060848603121561226557600080fd5b8335612270816121a4565b92506020840135612280816121a4565b91506040840135612290816121a4565b809150509250925092565b6000815180845260005b818110156122c1576020818501810151868301820152016122a5565b818111156122d3576000602083870101525b50601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561233d57603f1988860301845261232b85835161229b565b9450928501929085019060010161230f565b5092979650505050505050565b6000806000806080858703121561236057600080fd5b843561236b816121a4565b9350602085013561237b816121a4565b9250604085013561238b816121a4565b9396929550929360600135925050565b6000602082840312156123ad57600080fd5b8135600281106104d157600080fd5b6000806000606084860312156123d157600080fd5b83356123dc816121a4565b925060208401356123ec816121a4565b929592945050506040919091013590565b6000806040838503121561241057600080fd5b823561241b816121a4565b946020939093013593505050565b60006020828403121561243b57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561247b5781516001600160a01b031687529582019590820190600101612456565b509495945050505050565b6020815260006104d16020830184612442565b6000602082840312156124ab57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124e2576124e26124b2565b500290565b60008261250457634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561251c5761251c6124b2565b500190565b6001600160a01b03831681526040602082018190526000906105a39083018461229b565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561256d57600080fd5b81516104d1816121a4565b80516001600160701b03811681146103a657600080fd5b6000806000606084860312156125a457600080fd5b6125ad84612578565b92506125bb60208501612578565b9150604084015163ffffffff8116811461229057600080fd5b85815260ff8516602082015260a0604082015260006125f660a0830186612442565b6001600160a01b0394909416606083015250608001529392505050565b6020808252601e908201527f63616c6c6572206973206e6f7420746865207269736b4f70657261746f720000604082015260600190565b60008282101561265c5761265c6124b2565b500390565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c604082015267495155494449545960c01b60608201526080019056fea164736f6c634300080b000a" +} diff --git a/deployments/polygon/opUSDCgrow.json b/deployments/polygon/opUSDCgrow.json new file mode 100644 index 000000000..f3d0d1622 --- /dev/null +++ b/deployments/polygon/opUSDCgrow.json @@ -0,0 +1,1492 @@ +{ + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + }, + { + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "transactionIndex": 11, + "gasUsed": "830308", + "logsBloom": "0x00000000000008000000000000000000000000000001000400800000000000000000000000000000001400000000000000008010000000000000000000000000000000000000000000000000000000800001000000000000000100000040000008000000020000000000000000000800000000000000000080000004000100400000000000000000000000000000000000000020000000000000000000000000200000000000000000000000000200000000000200000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000100400000000000000000000000000200000102000100000", + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200", + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "logs": [ + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000003ef67348e102718e3d18bde2d9482f53c5354ee5" + ], + "data": "0x", + "logIndex": 33, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + }, + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 34, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + }, + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x00000000000000000000000000000000000000000000000000937e094cd142f800000000000000000000000000000000000000000000000022576c9342cb78000000000000000000000000000000000000000000000005a7cc007e2660dc0c2f00000000000000000000000000000000000000000000000021c3ee89f5fa35080000000000000000000000000000000000000000000005a7cc93fc2fadad4f27", + "logIndex": 35, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + } + ], + "blockNumber": 26876093, + "cumulativeGasUsed": "1971573", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee599600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "execute": { + "methodName": "initialize", + "args": [ + "0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", + "0xc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee5996", + "USDC Coin (PoS)", + "USDC", + "1" + ] + }, + "implementation": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/polygon/opUSDCgrow_Implementation.json b/deployments/polygon/opUSDCgrow_Implementation.json new file mode 100644 index 000000000..72c0f1e77 --- /dev/null +++ b/deployments/polygon/opUSDCgrow_Implementation.json @@ -0,0 +1,1320 @@ +{ + "address": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileName", + "type": "string" + }, + { + "internalType": "string", + "name": "_riskProfileSymbol", + "type": "string" + } + ], + "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": true, + "internalType": "bool", + "name": "emergencyShutdown", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogEmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "minimumDepositValueUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogMinimumDepositValueUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalValueLockedLimitUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogTotalValueLockedLimitUT", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bool", + "name": "unpaused", + "type": "bool" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUnpause", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "userDepositCapUT", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "LogUserDepositCapUT", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_codes", + "type": "bytes[]" + } + ], + "name": "adminCall", + "outputs": [], + "stateMutability": "nonpayable", + "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": [], + "name": "balanceUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "blockToBlockVaultValues", + "outputs": [ + { + "internalType": "uint256", + "name": "actualVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMinVaultValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockMaxVaultValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + } + ], + "name": "calcDepositFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawUT", + "type": "uint256" + } + ], + "name": "calcWithdrawalFeeUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "computeInvestStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "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": [], + "name": "getInvestStrategySteps", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "_investStrategySteps", + "type": "tuple[]" + } + ], + "name": "getLastStrategyStepBalanceLP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextBestInvestStrategy", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "internalType": "struct DataTypes.StrategyStep[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPricePerFullShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "_registry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "investStrategyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "investStrategySteps", + "outputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "internalType": "address", + "name": "outputToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBorrow", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_diff", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentVaultValue", + "type": "uint256" + } + ], + "name": "isMaxVaultValueJumpAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumDepositValueUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opTOKEN_REVISION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setEmergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + } + ], + "name": "setMinimumDepositValueUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_riskProfileCode", + "type": "uint256" + } + ], + "name": "setRiskProfileCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setTotalValueLockedLimitUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_underlyingTokensHash", + "type": "bytes32" + } + ], + "name": "setUnderlyingTokensHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_unpaused", + "type": "bool" + } + ], + "name": "setUnpaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + } + ], + "name": "setUserDepositCapUT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositCapUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumDepositValueUT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_totalValueLockedLimitUT", + "type": "uint256" + } + ], + "name": "setValueControlParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_vaultConfiguration", + "type": "uint256" + } + ], + "name": "setVaultConfiguration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedAccountsRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedAccountsRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_whitelistedCodesRoot", + "type": "bytes32" + } + ], + "name": "setWhitelistedCodesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalDeposits", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalValueLockedLimitUT", + "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": [], + "name": "underlyingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingTokensHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "userDepositCapUT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bool", + "name": "_addUserDepositUT", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_userDepositUTWithDeductions", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_deductions", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userDepositUT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userDepositVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_userWithdrawVT", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_accountsProof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "_codesProof", + "type": "bytes32[]" + } + ], + "name": "userWithdrawVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultConfiguration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositAllToStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaultDepositPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultWithdrawPermitted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedAccountsRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistedCodesRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xeefaa2d2e798a5b77d485afbf62d0f89e2004d6656843237dc6e9d0a03ed7e23", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "transactionIndex": 15, + "gasUsed": "5460356", + "logsBloom": "0x00000000000000000000000000000000000000000000000400000000000000000000000000000000001000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000200000002000100000", + "blockHash": "0x27e4bbd511062f75b87ca6a7cd1623eb52ccb13823a7e1ef42a09f3ebd748ced", + "transactionHash": "0xeefaa2d2e798a5b77d485afbf62d0f89e2004d6656843237dc6e9d0a03ed7e23", + "logs": [ + { + "transactionIndex": 15, + "blockNumber": 26876090, + "transactionHash": "0xeefaa2d2e798a5b77d485afbf62d0f89e2004d6656843237dc6e9d0a03ed7e23", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x00000000000000000000000000000000000000000000000003c9f43e142cc334000000000000000000000000000000000000000000000000262160d15d2748000000000000000000000000000000000000000000000005a7b7e47cd77bf8eb2700000000000000000000000000000000000000000000000022576c9348fa84cc0000000000000000000000000000000000000000000005a7bbae71159025ae5b", + "logIndex": 59, + "blockHash": "0x27e4bbd511062f75b87ca6a7cd1623eb52ccb13823a7e1ef42a09f3ebd748ced" + } + ], + "blockNumber": 26876090, + "cumulativeGasUsed": "6964764", + "status": 1, + "byzantium": true + }, + "args": ["0x32bd1a6fdaec327b57cdb2cfde0855afb3255d7c", "USD Coin (PoS)", "USDC", "Growth", "grow"], + "bytecode": "0x6080604052600080553480156200001557600080fd5b50604051620063823803806200638283398101604081905262000038916200020f565b8484836040516020016200004e92919062000327565b604051602081830303815290604052848360405160200162000072929190620002e3565b60408051601f19818403018152919052815162000097906037906020850190620000f2565b508051620000ad906038906020840190620000f2565b5050603980546001600160a01b0390931661010002610100600160a81b031960ff19909416601217939093169290921790915550506001603a5550620003a992505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013557805160ff191683800117855562000165565b8280016001018555821562000165579182015b828111156200016557825182559160200191906001019062000148565b506200017392915062000177565b5090565b5b8082111562000173576000815560010162000178565b600082601f8301126200019f578081fd5b81516001600160401b0380821115620001b6578283fd5b604051601f8301601f191681016020018281118282101715620001d7578485fd5b604052828152925082848301602001861015620001f357600080fd5b6200020683602083016020880162000376565b50505092915050565b600080600080600060a0868803121562000227578081fd5b85516001600160a01b03811681146200023e578182fd5b60208701519095506001600160401b03808211156200025b578283fd5b6200026989838a016200018e565b955060408801519150808211156200027f578283fd5b6200028d89838a016200018e565b94506060880151915080821115620002a3578283fd5b620002b189838a016200018e565b93506080880151915080821115620002c7578283fd5b50620002d6888289016200018e565b9150509295509295909350565b60006106f760f41b825283516200030281600285016020880162000376565b8351908301906200031b81600284016020880162000376565b01600201949350505050565b600062037b8160ed1b825283516200034781600385016020880162000376565b600160fd1b60039184019182015283516200036a81600484016020880162000376565b01600401949350505050565b60005b838110156200039357818101518382015260200162000379565b83811115620003a3576000848401525b50505050565b615fc980620003b96000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061038e5760003560e01c806387a53e7a116101de578063b1ff85221161010f578063d5802ec2116100ad578063dd62ed3e1161007c578063dd62ed3e1461071d578063ddf0b00914610730578063e940325614610751578063eb3349b9146107645761038e565b8063d5802ec2146106dc578063d952ca50146106ef578063da7058e414610702578063db7e5632146107155761038e565b8063c66da8e8116100e9578063c66da8e8146106a6578063c9dd6b24146106ae578063cf85f080146106b6578063d07c179b146106c95761038e565b8063b1ff852214610678578063b318b82d1461068b578063b8332c49146106935761038e565b8063a37085841161017c578063a91ee0dc11610156578063a91ee0dc14610642578063a9b497c814610655578063ae78b1b01461065d578063b00fce2a146106655761038e565b8063a370858414610614578063a457c2d71461061c578063a9059cbb1461062f5761038e565b80638c0e0357116101b85780638c0e0357146105e95780638d1efd78146105f157806395d89b4114610604578063a30b72711461060c5761038e565b806387a53e7a146105b0578063890ddde8146105c35780638aa2e4b4146105d65761038e565b80632e40939c116102c35780636889d6731161026157806376e57d031161023057806376e57d031461058557806377c7b8fc146105985780637c8eb82a146105a05780637d7c2a1c146105a85761038e565b80636889d6731461052a5780636db5eeb21461053d57806370a082311461055f57806371679bcb146105725761038e565b806337d62e541161029d57806337d62e54146104e957806339509351146104fc5780633c870dcf1461050f57806357a194ab146105175761038e565b80632e40939c146104b95780632e935aa7146104c1578063313ce567146104d45761038e565b806318160ddd116103305780632495a5991161030a5780632495a5991461048157806328c1f99b1461049657806329dc06581461049e5780632a4d7943146104a65761038e565b806318160ddd1461044457806323b872dd1461044c57806323bb5fac1461045f5761038e565b806306fdde031161036c57806306fdde03146103e757806307134773146103fc578063095ea7b31461041157806314c64402146104315761038e565b806301dcad0f1461039357806303f2e589146103bd5780630537df97146103d2575b600080fd5b6103a66103a13660046151a2565b610777565b6040516103b49291906159d8565b60405180910390f35b6103c561089e565b6040516103b4919061579f565b6103da6108a4565b6040516103b49190615973565b6103ef6109be565b6040516103b491906159f3565b61040f61040a366004615549565b610a54565b005b61042461041f366004615177565b610b18565b6040516103b491906159cd565b61040f61043f366004615511565b610b36565b6103c5610cf0565b61042461045a36600461501c565b610cf6565b61047261046d3660046156bc565b610d7e565b6040516103b493929190615e4c565b610489610dbd565b6040516103b49190615897565b610489610dcc565b6103c5610de0565b61040f6104b43660046152b6565b610de6565b6103a6610ec3565b61040f6104cf3660046156dd565b610f14565b6104dc610fea565b6040516103b49190615e62565b61040f6104f7366004615511565b610ff3565b61042461050a366004615177565b6111a8565b61040f6111f6565b61040f610525366004615549565b6112c9565b61040f610538366004615549565b611388565b61055061054b366004615549565b611447565b6040516103b493929190615912565b6103c561056d366004614f5e565b61148a565b61040f610580366004615646565b6114a9565b61040f6105933660046150f3565b6116a9565b6103c5611950565b6103a6611993565b61040f6119fc565b61040f6105be366004615549565b611d00565b6103c56105d13660046153b8565b611dbb565b61040f6105e4366004615549565b611ee2565b6103c5611fa1565b6103c56105ff366004615549565b611fa7565b6103ef611fef565b6103c5612050565b6103da612055565b61042461062a366004615177565b6120e2565b61042461063d366004615177565b61214a565b61040f610650366004614f5e565b61215e565b6103c561226a565b6103c5612270565b6103a661067336600461505c565b612276565b6103c56106863660046153b8565b61242e565b6103c5612456565b6104246106a13660046156bc565b61245c565b6103c561248a565b6103c561250b565b61040f6106c4366004615549565b612511565b61040f6106d7366004615549565b6125cc565b6103c56106ea366004615549565b612719565b61040f6106fd366004615549565b612757565b61040f610710366004615646565b612816565b6103c5612b21565b6103c561072b366004614fe4565b612b27565b61074361073e366004615549565b612b52565b6040516103b492919061595a565b6103c561075f366004614f5e565b612b87565b6103c5610772366004614f5e565b612b99565b60006060604254600160fa1b166000141580156107a357506107a161079b87612bab565b85612bdb565b155b156107ca5750506040805180820190915260018152600760fb1b6020820152600090610895565b6001600160a01b03861632148015906107eb57506107e9868585612bea565b155b156108125750506040805180820190915260018152603960f81b6020820152600090610895565b604254600160f91b166108425750506040805180820190915260028152610c4d60f21b6020820152600090610895565b60008511801561085a57506108568661148a565b8511155b6108805750506040805180820190915260018152603160f81b6020820152600090610895565b50506040805160208101909152600081526001905b94509492505050565b60445481565b6060603960019054906101000a90046001600160a01b03166001600160a01b031663d71f05e66040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f457600080fd5b505afa158015610908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092c9190614f7a565b6001600160a01b031663a64e1e7b60f0604254901c60ff166047546040518363ffffffff1660e01b81526004016109649291906157e2565b60006040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b89190810190615482565b90505b90565b60378054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b820191906000526020600020905b815481529060010190602001808311610a2d57829003601f168201915b5050505050905090565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa257600080fd5b505afa158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ada9190614f7a565b6001600160a01b0316336001600160a01b031614610b135760405162461bcd60e51b8152600401610b0a90615a06565b60405180910390fd5b604455565b6000610b2c610b25612c27565b8484612c2b565b5060015b92915050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc9190614f7a565b6001600160a01b0316336001600160a01b031614610bec5760405162461bcd60e51b8152600401610b0a90615a06565b60428054600160ff60f81b031690558015610cb65760428054600160f81b179055603f5415610cb657610ca36048805480602002602001604051908101604052809291908181526020016000905b82821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b50505050612cdf565b6000603f819055610cb690604890614c10565b6042546040513391600160f81b161515907f3f14e04c219cb203de89f60db463113cc68cf16c00a46ef96a1fce6ca8abb5bb90600090a350565b60365490565b6000610d03848484612cf1565b610d7384610d0f612c27565b610d6e85604051806060016040528060288152602001615f70602891396001600160a01b038a16600090815260356020526040812090610d4d612c27565b6001600160a01b031681526020810191909152604001600020549190612e06565b612c2b565b5060015b9392505050565b603e6020528160005260406000208181548110610d9757fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b6043546001600160a01b031681565b60395461010090046001600160a01b031681565b60455481565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3457600080fd5b505afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c9190614f7a565b6001600160a01b0316336001600160a01b031614610e9c5760405162461bcd60e51b8152600401610b0a90615b30565b610ec08160405180604001604052806002815260200161313560f01b815250612e32565b50565b60006060604254600160f91b1660001415610efb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b50506040805160208101909152600081526001905b9091565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6257600080fd5b505afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9a9190614f7a565b6001600160a01b0316336001600160a01b031614610fca5760405162461bcd60e51b8152600401610b0a90615bdf565b610fd383612e63565b610fdc82612e96565b610fe581612ecb565b505050565b60395460ff1690565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190614f7a565b6001600160a01b0316336001600160a01b0316146110a95760405162461bcd60e51b8152600401610b0a90615a06565b604280546001607f60f91b031690558061116157603f541561115c5761114960488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b6000603f81905561115c90604890614c10565b61116e565b60428054600160f91b1790555b6042546040513391600160f91b161515907fbef546d8099130f7f80a42b7eb7f2aa81c1dd73f07fc569fe30338e102bba27390600090a350565b6000610b2c6111b5612c27565b84610d6e85603560006111c6612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612f00565b60006060611202611993565b915091508181906112265760405162461bcd60e51b8152600401610b0a91906159f3565b50603f54156112c5576112c56048805480602002602001604051908101604052809291908181526020016000905b828210156112b4576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611254565b505050506112c061248a565b612f25565b5050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190614f7a565b6001600160a01b0316336001600160a01b03161461137f5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e63565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d657600080fd5b505afa1580156113ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140e9190614f7a565b6001600160a01b0316336001600160a01b03161461143e5760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612e96565b6048818154811061145457fe5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b6001600160a01b0381166000908152603460205260409020545b919050565b6002603a5414156114cc5760405162461bcd60e51b8152600401610b0a90615dde565b6002603a55600060606114dd611993565b915091508181906115015760405162461bcd60e51b8152600401610b0a91906159f3565b50505061151461150f612fd2565b613099565b600061151e6132e9565b9050600061152a61248a565b604354909150611545906001600160a01b031633308a6132fe565b600061154f61248a565b9050600061155d8284613356565b9050600061156a82612719565b905060006115788383613356565b90506115fd33600083858e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061337e92505050565b336000908152603d60205260409020546116179082612f00565b336000908152603d6020526040902055811561164c5760425460435461164c916001600160a01b039091169060501c846133bf565b85158061165e575061165c610cf0565b155b156116725761166d33826133de565b611697565b611697336116928861168c611685610cf0565b869061349e565b906134d8565b6133de565b50506001603a55505050505050505050565b60006116b361350a565b60015490915060ff16806116ca57506116ca61350f565b806116d6575060005481115b6116f25760405162461bcd60e51b8152600401610b0a90615c20565b60015460ff16158015611711576001805460ff19168117905560008290555b6000855111604051806040016040528060018152602001600d60fa1b8152509061174e5760405162461bcd60e51b8152600401610b0a91906159f3565b506000845111604051806040016040528060018152602001600d60fa1b8152509061178c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060398054610100600160a81b0319166101006001600160a01b038a16021790556117b5614c31565b603954604051639ec39e2f60e01b81526101009091046001600160a01b031690639ec39e2f906117e990879060040161579f565b60006040518083038186803b15801561180157600080fd5b505afa158015611815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261183d9190810190615561565b905061184d848260600151613515565b61185687613566565b61188486826080015160405160200161187092919061584c565b604051602081830303815290604052613756565b6118b2858260a0015160405160200161189e92919061580c565b604051602081830303815290604052613769565b6043546040805163313ce56760e01b81529051611935926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156118f857600080fd5b505afa15801561190c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119309190615708565b61377c565b508015611947576001805460ff191690555b50505050505050565b600061195a610cf0565b1561198b5761198461196a610cf0565b61168c670de0b6b3a764000061197e6132e9565b9061349e565b90506109bb565b5060006109bb565b60006060604254600160f91b16600014156119cb5750506040805180820190915260028152610c4d60f21b6020820152600090610f10565b604254600160f81b1615610efb575050604080518082019091526002815261313360f01b6020820152600090610f10565b60006060611a08611993565b91509150818190611a2c5760405162461bcd60e51b8152600401610b0a91906159f3565b5060006060611a39610ec3565b91509150818190611a5d5760405162461bcd60e51b8152600401610b0a91906159f3565b50611a6e611a696108a4565b613792565b6000611afe6049805480602002602001604051908101604052809291908181526020016000905b82821015611af5576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611a95565b50505050611dbb565b9050603f548114611c4657603f5415611b9557611b9560488054806020026020016040519081016040528092919081815260200160009082821015610c9a576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101610c3a565b611ba160486000614c10565b60005b604954811015611c3f57604860498281548110611bbd57fe5b6000918252602080832084546001818101875595855291909320600292830290930180549190920290920180546001600160a01b03199081166001600160a01b03948516178255918401805491850180549093169190931617808255915460ff600160a01b918290041615150260ff60a01b1990921691909117905501611ba4565b50603f8190555b6000611c5061248a565b603f5490915015801590611c645750600081115b15611cf857611cf86048805480602002602001604051908101604052809291908181526020016000905b82821015611cee576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101611c8e565b5050505082612f25565b505050505050565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d4e57600080fd5b505afa158015611d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d869190614f7a565b6001600160a01b0316336001600160a01b031614611db65760405162461bcd60e51b8152600401610b0a90615a06565b604655565b805160009015611eda57606082516001600160401b0381118015611dde57600080fd5b50604051908082528060200260200182016040528015611e08578160200160208202803683370190505b50905060005b8351811015611ea657838181518110611e2357fe5b602002602001015160000151848281518110611e3b57fe5b602002602001015160200151858381518110611e5357fe5b602002602001015160400151604051602001611e719392919061576c565b60405160208183030381529060405280519060200120828281518110611e9357fe5b6020908102919091010152600101611e0e565b5060475481604051602001611ebc9291906157a8565b604051602081830303815290604052805190602001209150506114a4565b506000919050565b603960019054906101000a90046001600160a01b03166001600160a01b031663054159966040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3057600080fd5b505afa158015611f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f689190614f7a565b6001600160a01b0316336001600160a01b031614611f985760405162461bcd60e51b8152600401610b0a90615bdf565b610ec081612ecb565b60405481565b6000610b30611fb4610fea565b60ff16600a0a6020604254901c61ffff1602611fe961271061168c6030604254901c61ffff168761349e90919063ffffffff16565b90612f00565b60388054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a4a5780601f10610a1f57610100808354040283529160200191610a4a565b600381565b60606048805480602002602001604051908101604052809291908181526020016000905b828210156120d9576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612079565b50505050905090565b6000610b2c6120ef612c27565b84610d6e85604051806060016040528060258152602001615f986025913960356000612119612c27565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612e06565b6000610b2c612157612c27565b8484612cf1565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156121ac57600080fd5b505afa1580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614f7a565b6001600160a01b0316336001600160a01b0316146122145760405162461bcd60e51b8152600401610b0a90615b30565b612226816001600160a01b031661382c565b6122425760405162461bcd60e51b8152600401610b0a90615cf4565b603980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b603f5481565b60415481565b60006060604254600160fa1b1660001415801561229c575061229a61079b89612bab565b155b156122c35750506040805180820190915260018152600760fb1b6020820152600090612423565b6001600160a01b03881632148015906122e457506122e2888585612bea565b155b1561230b5750506040805180820190915260018152603960f81b6020820152600090612423565b604154861015612338575050604080518082019091526002815261031360f41b6020820152600090612423565b60006123426132e9565b90508715801561235c575060455461235a8288613356565b115b15612385575050604080518082019091526002815261313160f01b602082015260009150612423565b6045546123928289612f00565b11156123bc575050604080518082019091526002815261313160f01b602082015260009150612423565b604080546001600160a01b038b166000908152603d60205291909120546123e39089612f00565b111561240d575050604080518082019091526002815261189960f11b602082015260009150612423565b5050604080516020810190915260008152600191505b965096945050505050565b603954604354600091610b309184916001600160a01b03610100909104811691309116613832565b60465481565b60006040604254901c61ffff166124828361168c6127108761349e90919063ffffffff16565b109392505050565b6043546040516370a0823160e01b81526000916001600160a01b0316906370a08231906124bb903090600401615897565b60206040518083038186803b1580156124d357600080fd5b505afa1580156124e7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b8919061562e565b60475481565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125979190614f7a565b6001600160a01b0316336001600160a01b0316146125c75760405162461bcd60e51b8152600401610b0a90615a06565b604255565b603960019054906101000a90046001600160a01b03166001600160a01b031663289b3c0d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261a57600080fd5b505afa15801561262e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126529190614f7a565b6001600160a01b0316336001600160a01b0316146126825760405162461bcd60e51b8152600401610b0a90615a06565b603954604051639ec39e2f60e01b8152610ec09183916101009091046001600160a01b031690639ec39e2f906126bc90849060040161579f565b60006040518083038186803b1580156126d457600080fd5b505afa1580156126e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526127109190810190615561565b60600151613515565b6000610b30612726610fea565b60ff16600a0a60425461ffff1602611fe961271061168c6010604254901c61ffff168761349e90919063ffffffff16565b603960019054906101000a90046001600160a01b03166001600160a01b031663e7f43c686040518163ffffffff1660e01b815260040160206040518083038186803b1580156127a557600080fd5b505afa1580156127b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127dd9190614f7a565b6001600160a01b0316336001600160a01b03161461280d5760405162461bcd60e51b8152600401610b0a90615b30565b610ec081613566565b6002603a5414156128395760405162461bcd60e51b8152600401610b0a90615dde565b6002603a556000606061284a610ec3565b9150915081819061286e5760405162461bcd60e51b8152600401610b0a91906159f3565b50505061287c61150f612fd2565b6128eb338686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250613a6292505050565b600061290a6128f8610cf0565b61168c6129036132e9565b899061349e565b90506129163387613a96565b600061292061248a565b905081811015612abf5760006129368383613356565b60395460435460488054604080516020808402820181019092528281529596506000956129f0956001600160a01b03610100909104811695169388939192909190889084015b828210156129dc576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff16151591830191909152908352909201910161297c565b50505050613b6c909392919063ffffffff16565b9050612a816048805480602002602001604051908101604052809291908181526020016000905b82821015612a77576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101612a17565b5050505082613ce4565b6000612a8b61248a565b90506000612a998286613356565b905083811015612aba57612ab7612ab08583613356565b8790613356565b95505b505050505b6000612aca83611fa7565b90508015612af157604254604354612af1916001600160a01b039091169060501c836133bf565b612b1233612aff8584613356565b6043546001600160a01b031691906133bf565b50506001603a55505050505050565b60425481565b6001600160a01b03918216600090815260356020908152604080832093909416825291909152205490565b603b8181548110612b5f57fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b603d6020526000908152604090205481565b603c6020526000908152604090205481565b600081604051602001612bbe919061574f565b604051602081830303815290604052805190602001209050919050565b6000610d778260445485613d71565b6000612bfe612bf885612bab565b84612bdb565b8015612c1f5750612c1f612c19612c1486613e0e565b613e12565b83613e25565b949350505050565b3390565b6001600160a01b038316612c515760405162461bcd60e51b8152600401610b0a90615d19565b6001600160a01b038216612c775760405162461bcd60e51b8152600401610b0a90615a80565b6001600160a01b0380841660008181526035602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590612cd290859061579f565b60405180910390a3505050565b610ec081612cec8361242e565b613ce4565b6001600160a01b038316612d175760405162461bcd60e51b8152600401610b0a90615caf565b6001600160a01b038216612d3d5760405162461bcd60e51b8152600401610b0a90615a3d565b612d48838383613e34565b612d8581604051806060016040528060268152602001615f4a602691396001600160a01b0386166000908152603460205260409020549190612e06565b6001600160a01b038085166000908152603460205260408082209390935590841681522054612db49082612f00565b6001600160a01b0380841660008181526034602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90612cd290859061579f565b60008184841115612e2a5760405162461bcd60e51b8152600401610b0a91906159f3565b505050900390565b60005b8251811015610fe557612e5b838281518110612e4d57fe5b602002602001015183613e77565b600101612e35565b604081815551339082907f70c87424f133fbd8c8e63b0dc9c2d2702db0a79d7d4139b25a5035f250b9f73890600090a350565b6041819055604051339082907f7af95a1df120276e178a852832ba64d58429b2b5986955c772448d80c08ef39290600090a350565b6045819055604051339082907fae4cf6e16f407af30e4a8e158871dd4eb7d4ad22f2438ccc43c5855fcd6ebbee90600090a350565b600082820183811015610d775760405162461bcd60e51b8152600401610b0a90615ac2565b603954600090612f4490849061010090046001600160a01b0316613f13565b905060005b81811015612fcc576040805160c0810182526039546001600160a01b03610100909104811682523060208301526043541691810191909152606081018490526080810182905260a08101839052612fc490612fa5908690614045565b604051806040016040528060018152602001601960f91b815250612e32565b600101612f49565b50505050565b603f54600090612fe35760006109b8565b60395460435460488054604080516020808402820181019092528281526109b8956001600160a01b036101009091048116953095911693919290919060009084015b82821015613085576000848152602090819020604080516060810182526002860290920180546001600160a01b03908116845260019182015490811684860152600160a01b900460ff161515918301919091529083529092019101613025565b5050505061442c909392919063ffffffff16565b436000908152603e6020526040902054801561329357436000818152603e6020818152604080842081516060810190925287825294909352908152825490820190839060001986019081106130ea57fe5b906000526020600020906003020160010154851061313857436000908152603e602052604090208054600019860190811061312157fe5b90600052602060002090600302016001015461313a565b845b8152602001603e6000438152602001908152602001600020600185038154811061316057fe5b90600052602060002090600302016002015485116131ae57436000908152603e602052604090208054600019860190811061319757fe5b9060005260206000209060030201600201546131b0565b845b90528154600181810184556000938452602080852084516003909402019283558084015191830191909155604092830151600290920191909155438352603e9052902080546132549161324e918490811061320757fe5b906000526020600020906003020160010154603e6000438152602001908152602001600020848154811061323757fe5b906000526020600020906003020160020154614742565b8361245c565b60405180604001604052806002815260200161189b60f11b8152509061328d5760405162461bcd60e51b8152600401610b0a91906159f3565b506112c5565b436000908152603e60209081526040808320815160608101835286815280840187815292810187815282546001818101855593875294909520905160039094020192835590519082015590516002909101555050565b60006109b86132f661248a565b611fe9612fd2565b612fcc846323b872dd60e01b85858560405160240161331f93929190615936565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614764565b6000828211156133785760405162461bcd60e51b8152600401610b0a90615af9565b50900390565b60006060613390888888888888612276565b915091508181906133b45760405162461bcd60e51b8152600401610b0a91906159f3565b505050505050505050565b610fe58363a9059cbb60e01b848460405160240161331f92919061595a565b6001600160a01b0382166134045760405162461bcd60e51b8152600401610b0a90615e15565b61341060008383613e34565b60365461341d9082612f00565b6036556001600160a01b0382166000908152603460205260409020546134439082612f00565b6001600160a01b0383166000818152603460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b60405180910390a35050565b6000826134ad57506000610b30565b828202828482816134ba57fe5b0414610d775760405162461bcd60e51b8152600401610b0a90615b9e565b60008082116134f95760405162461bcd60e51b8152600401610b0a90615b67565b81838161350257fe5b049392505050565b600390565b303b1590565b6040805180820190915260018152603560f81b60208201528161354b5760405162461bcd60e51b8152600401610b0a91906159f3565b5060425460ff60f01b191660f083901b176042819055505050565b603954604051638346525f60e01b815260609161010090046001600160a01b031690638346525f9061359c90859060040161579f565b60006040518083038186803b1580156135b457600080fd5b505afa1580156135c8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526135f0919081019061521e565b9050805160011460405180604001604052806002815260200161313760f01b815250906136305760405162461bcd60e51b8152600401610b0a91906159f3565b50603960019054906101000a90046001600160a01b03166001600160a01b0316632d5ad3d58260008151811061366257fe5b60200260200101516040518263ffffffff1660e01b81526004016136869190615897565b60206040518083038186803b15801561369e57600080fd5b505afa1580156136b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d6919061552d565b60405180604001604052806002815260200161313960f01b8152509061370f5760405162461bcd60e51b8152600401610b0a91906159f3565b50816047819055508060008151811061372457fe5b6020026020010151604360006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b80516112c5906037906020840190614c69565b80516112c5906038906020840190614c69565b6039805460ff191660ff92909216919091179055565b61379e60496000614c10565b60005b81518110156112c55760498282815181106137b857fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b03199081166001600160a01b039384161782559383015190850180546040909401519390941691161760ff60a01b1916600160a01b91151591909102179055016137a1565b3b151590565b6000808560018751038151811061384557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016138819190615897565b60206040518083038186803b15801561389957600080fd5b505afa1580156138ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138d19190614f7a565b6040516336d8bf9360e01b81529091506001600160a01b038216906336d8bf9390613900908590600401615897565b60206040518083038186803b15801561391857600080fd5b505afa15801561392c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613950919061552d565b6139d9576040516390e6160560e01b81526001600160a01b038216906390e6160590613984908890889087906004016158c5565b60206040518083038186803b15801561399c57600080fd5b505afa1580156139b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d4919061562e565b613a57565b60405163afd908d960e01b81526001600160a01b0382169063afd908d990613a0790889086906004016158ab565b60206040518083038186803b158015613a1f57600080fd5b505afa158015613a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a57919061562e565b979650505050505050565b60006060613a7286868686610777565b915091508181906119475760405162461bcd60e51b8152600401610b0a91906159f3565b6001600160a01b038216613abc5760405162461bcd60e51b8152600401610b0a90615c6e565b613ac882600083613e34565b613b0581604051806060016040528060228152602001615f28602291396001600160a01b0385166000908152603460205260409020549190612e06565b6001600160a01b038316600090815260346020526040902055603654613b2b9082613356565b6036556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061349290859061579f565b8351600090815b81811015613cda576000878281518110613b8957fe5b60200260200101516000015190506000876001600160a01b031663923bb7ff836040518263ffffffff1660e01b8152600401613bc59190615897565b60206040518083038186803b158015613bdd57600080fd5b505afa158015613bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c159190614f7a565b9050868315613c3c57896001850381518110613c2d57fe5b60200260200101516020015190505b6001600160a01b0382166385541e4482858715613c595789613c5b565b8a5b6040518463ffffffff1660e01b8152600401613c7993929190615936565b60206040518083038186803b158015613c9157600080fd5b505afa158015613ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cc9919061562e565b95505060019092019150613b739050565b5050949350505050565b815160005b81811015612fcc576040805160c0810182526039546001600160a01b036101009091048116825230602083015260435416918101919091526060810184905281830360001901608082015260a08101839052613d6990613d4a9086906147f3565b604051806040016040528060018152602001603360f81b815250612e32565b600101613ce9565b600081815b8551811015613e03576000868281518110613d8d57fe5b60200260200101519050808311613dce578281604051602001613db19291906157e2565b604051602081830303815290604052805190602001209250613dfa565b8083604051602001613de19291906157e2565b6040516020818303038152906040528051906020012092505b50600101613d76565b509092149392505050565b3f90565b600081604051602001612bbe919061579f565b6000610d778260465485613d71565b604080518082019091526002815261062760f31b60208201526001600160a01b038316301415612fcc5760405162461bcd60e51b8152600401610b0a91906159f3565b6000606083806020019051810190613e8f9190614f96565b915091506000826001600160a01b031682604051613ead91906157f0565b6000604051808303816000865af19150503d8060008114613eea576040519150601f19603f3d011682016040523d82523d6000602084013e613eef565b606091505b50509050808490611cf85760405162461bcd60e51b8152600401610b0a91906159f3565b815160009081846000198301838110613f2857fe5b6020026020010151600001519050836001600160a01b031663923bb7ff826040518263ffffffff1660e01b8152600401613f629190615897565b60206040518083038186803b158015613f7a57600080fd5b505afa158015613f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fb29190614f7a565b6001600160a01b03166336d8bf93826040518263ffffffff1660e01b8152600401613fdd9190615897565b60206040518083038186803b158015613ff557600080fd5b505afa158015614009573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061402d919061552d565b1561403d57506001019050610b30565b509392505050565b8051604082015160608381015185516080860151929493928114156142435760008760018860800151038151811061407957fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016140b59190615897565b60206040518083038186803b1580156140cd57600080fd5b505afa1580156140e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141059190614f7a565b90508860018960800151038151811061411a57fe5b602002602001015160200151945087604001516001600160a01b03166370a0823189602001516040518263ffffffff1660e01b815260040161415c9190615897565b60206040518083038186803b15801561417457600080fd5b505afa158015614188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ac919061562e565b9350806001600160a01b03166374df3b2f89602001518a60400151856040518463ffffffff1660e01b81526004016141e6939291906158c5565b60006040518083038186803b1580156141fe57600080fd5b505afa158015614212573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261423a919081019061533e565b96505050614422565b60008787608001518151811061425557fe5b60200260200101516000015190506000856001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016142919190615897565b60206040518083038186803b1580156142a957600080fd5b505afa1580156142bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e19190614f7a565b90508760800151600014614393578860018960800151038151811061430257fe5b6020026020010151602001519450846001600160a01b03166370a0823189602001516040518263ffffffff1660e01b81526004016143409190615897565b60206040518083038186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614390919061562e565b93505b6020880151604051636fc9ab9160e11b81526001600160a01b0383169163df935722916143c99190899087908a906004016158e8565b60006040518083038186803b1580156143e157600080fd5b505afa1580156143f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261441d919081019061533e565b965050505b5050505092915050565b835160009081805b828110156147375760008160018503039050600089828151811061445457fe5b60200260200101516000015190506000896001600160a01b031663923bb7ff836040518263ffffffff1660e01b81526004016144909190615897565b60206040518083038186803b1580156144a857600080fd5b505afa1580156144bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e09190614f7a565b9050878315614507578b60018503815181106144f857fe5b60200260200101516020015190505b600187038414156146a1576040516336d8bf9360e01b81526001600160a01b038316906336d8bf939061453e908690600401615897565b60206040518083038186803b15801561455657600080fd5b505afa15801561456a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061458e919061552d565b1561461a57604051632627a09960e01b81526001600160a01b03831690632627a099906145c3908d90859088906004016158c5565b60206040518083038186803b1580156145db57600080fd5b505afa1580156145ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614613919061562e565b975061469c565b60405162c9babf60e71b81526001600160a01b038316906364dd5f8090614649908d90859088906004016158c5565b60206040518083038186803b15801561466157600080fd5b505afa158015614675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614699919061562e565b97505b614724565b60405163ee665bed60e01b81526001600160a01b0383169063ee665bed906146d190849087908b90600401615936565b60206040518083038186803b1580156146e957600080fd5b505afa1580156146fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614721919061562e565b97505b5086945050600190920191506144349050565b505050949350505050565b600081831161475a576147558284613356565b610d77565b610d778383613356565b60606147b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614b3d9092919063ffffffff16565b805190915015610fe557808060200190518101906147d7919061552d565b610fe55760405162461bcd60e51b8152600401610b0a90615d94565b606060008383608001518151811061480757fe5b602090810291909101015151835160405163923bb7ff60e01b8152919250906000906001600160a01b0383169063923bb7ff90614848908690600401615897565b60206040518083038186803b15801561486057600080fd5b505afa158015614874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148989190614f7a565b6040860151606087015160808801519293509091156148d357876001886080015103815181106148c457fe5b60200260200101516020015191505b60018760a001510387608001511461498357878760800151815181106148f557fe5b6020026020010151602001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b81526004016149309190615897565b60206040518083038186803b15801561494857600080fd5b505afa15801561495c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614980919061562e565b90505b60018760a00151038760800151148015614a1457506040516336d8bf9360e01b81526001600160a01b038416906336d8bf93906149c4908890600401615897565b60206040518083038186803b1580156149dc57600080fd5b505afa1580156149f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a14919061552d565b614aa7576020870151604051636092577960e01b81526001600160a01b03851691636092577991614a4e919086908a9087906004016158e8565b60006040518083038186803b158015614a6657600080fd5b505afa158015614a7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614aa2919081019061533e565b614b31565b6020870151604051631496678160e11b81526001600160a01b0385169163292ccf0291614add919086908a9087906004016158e8565b60006040518083038186803b158015614af557600080fd5b505afa158015614b09573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052614b31919081019061533e565b98975050505050505050565b6060612c1f848460008585614b518561382c565b614b6d5760405162461bcd60e51b8152600401610b0a90615d5d565b60006060866001600160a01b03168587604051614b8a91906157f0565b60006040518083038185875af1925050503d8060008114614bc7576040519150601f19603f3d011682016040523d82523d6000602084013e614bcc565b606091505b5091509150613a5782828660608315614be6575081610d77565b825115614bf65782518084602001fd5b8160405162461bcd60e51b8152600401610b0a91906159f3565b5080546000825560020290600052602060002090810190610ec09190614ce7565b6040805160c08101825260008082526020820152908101614c50614d18565b8152600060208201526060604082018190529081015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614caa57805160ff1916838001178555614cd7565b82800160010185558215614cd7579182015b82811115614cd7578251825591602001919060010190614cbc565b50614ce3929150614d2f565b5090565b5b80821115614ce35780546001600160a01b03191681556001810180546001600160a81b0319169055600201614ce8565b604080518082019091526000808252602082015290565b5b80821115614ce35760008155600101614d30565b8035610b3081615f04565b60008083601f840112614d60578182fd5b5081356001600160401b03811115614d76578182fd5b6020830191508360208083028501011115614d9057600080fd5b9250929050565b600082601f830112614da7578081fd5b8135614dba614db582615e96565b615e70565b818152915060208083019084810181840286018201871015614ddb57600080fd5b60005b84811015614dfa57813584529282019290820190600101614dde565b505050505092915050565b8035610b3081615f19565b8051610b3081615f19565b600082601f830112614e2b578081fd5b8135614e39614db582615eb5565b9150808252836020828501011115614e5057600080fd5b8060208401602084013760009082016020015292915050565b600082601f830112614e79578081fd5b8151614e87614db582615eb5565b9150808252836020828501011115614e9e57600080fd5b614eaf816020840160208601615ed8565b5092915050565b600060408284031215614ec7578081fd5b614ed16040615e70565b9050614edd8383614f4d565b8152614eec8360208401614f4d565b602082015292915050565b600060608284031215614f08578081fd5b614f126060615e70565b90508151614f1f81615f04565b81526020820151614f2f81615f04565b60208201526040820151614f4281615f19565b604082015292915050565b805160ff81168114610b3057600080fd5b600060208284031215614f6f578081fd5b8135610d7781615f04565b600060208284031215614f8b578081fd5b8151610d7781615f04565b60008060408385031215614fa8578081fd5b8251614fb381615f04565b60208401519092506001600160401b03811115614fce578182fd5b614fda85828601614e69565b9150509250929050565b60008060408385031215614ff6578182fd5b823561500181615f04565b9150602083013561501181615f04565b809150509250929050565b600080600060608486031215615030578081fd5b833561503b81615f04565b9250602084013561504b81615f04565b929592945050506040919091013590565b60008060008060008060c08789031215615074578384fd5b863561507f81615f04565b9550602087013561508f81615f19565b9450604087013593506060870135925060808701356001600160401b03808211156150b8578384fd5b6150c48a838b01614d97565b935060a08901359150808211156150d9578283fd5b506150e689828a01614d97565b9150509295509295509295565b600080600080600060a0868803121561510a578283fd5b853561511581615f04565b94506020860135935060408601356001600160401b0380821115615137578485fd5b61514389838a01614e1b565b94506060880135915080821115615158578283fd5b5061516588828901614e1b565b95989497509295608001359392505050565b60008060408385031215615189578182fd5b823561519481615f04565b946020939093013593505050565b600080600080608085870312156151b7578182fd5b84356151c281615f04565b93506020850135925060408501356001600160401b03808211156151e4578384fd5b6151f088838901614d97565b93506060870135915080821115615205578283fd5b5061521287828801614d97565b91505092959194509250565b60006020808385031215615230578182fd5b82516001600160401b03811115615245578283fd5b8301601f81018513615255578283fd5b8051615263614db582615e96565b818152838101908385018584028501860189101561527f578687fd5b8694505b838510156152aa57805161529681615f04565b835260019490940193918501918501615283565b50979650505050505050565b600060208083850312156152c8578182fd5b82356001600160401b038111156152dd578283fd5b8301601f810185136152ed578283fd5b80356152fb614db582615e96565b81815283810190838501865b848110156153305761531e8a888435890101614e1b565b84529286019290860190600101615307565b509098975050505050505050565b60006020808385031215615350578182fd5b82516001600160401b03811115615365578283fd5b8301601f81018513615375578283fd5b8051615383614db582615e96565b81815283810190838501865b84811015615330576153a68a888451890101614e69565b8452928601929086019060010161538f565b600060208083850312156153ca578182fd5b82356001600160401b038111156153df578283fd5b8301601f810185136153ef578283fd5b80356153fd614db582615e96565b818152838101908385016060808502860187018a101561541b578788fd5b8795505b848610156153305780828b031215615435578788fd5b61543e81615e70565b6154488b84614d44565b81526154568b898501614d44565b8882015260406154688c828601614e05565b90820152845260019590950194928601929081019061541f565b60006020808385031215615494578182fd5b82516001600160401b038111156154a9578283fd5b8301601f810185136154b9578283fd5b80516154c7614db582615e96565b818152838101908385016060808502860187018a10156154e5578788fd5b8795505b84861015615330576154fb8a83614ef7565b84526001959095019492860192908101906154e9565b600060208284031215615522578081fd5b8135610d7781615f19565b60006020828403121561553e578081fd5b8151610d7781615f19565b60006020828403121561555a578081fd5b5035919050565b600060208284031215615572578081fd5b81516001600160401b0380821115615588578283fd5b9083019060e0828603121561559b578283fd5b6155a560c0615e70565b825181526155b68660208501614e10565b60208201526155c88660408501614eb6565b60408201526155da8660808501614e10565b606082015260a0830151828111156155f0578485fd5b6155fc87828601614e69565b60808301525060c083015182811115615613578485fd5b61561f87828601614e69565b60a08301525095945050505050565b60006020828403121561563f578081fd5b5051919050565b60008060008060006060868803121561565d578283fd5b8535945060208601356001600160401b038082111561567a578485fd5b61568689838a01614d4f565b9096509450604088013591508082111561569e578283fd5b506156ab88828901614d4f565b969995985093965092949392505050565b600080604083850312156156ce578182fd5b50508035926020909101359150565b6000806000606084860312156156f1578081fd5b505081359360208301359350604090920135919050565b600060208284031215615719578081fd5b610d778383614f4d565b6000815180845261573b816020860160208601615ed8565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6bffffffffffffffffffffffff19606094851b811682529290931b9091166014830152151560f81b602882015260290190565b90815260200190565b600083825260208083018451828601845b828110156157d5578151845292840192908401906001016157b9565b5091979650505050505050565b918252602082015260400190565b60008251615802818460208701615ed8565b9190910192915050565b60006106f760f41b82528351615829816002850160208801615ed8565b835190830190615840816002840160208801615ed8565b01600201949350505050565b600062037b8160ed1b8252835161586a816003850160208801615ed8565b600160fd1b600391840191820152835161588b816004840160208801615ed8565b01600401949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152901515604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b602080825282518282018190526000919060409081850190868401855b828110156157d557815180516001600160a01b03908116865287820151168786015285015115158585015260609093019290850190600101615990565b901515815260200190565b6000831515825260406020830152612c1f6040830184615723565b600060208252610d776020830184615723565b6020808252601f908201527f63616c6c6572206973206e6f7420686176696e6720676f7665726e616e636500604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f63616c6c6572206973206e6f7420746865206f70657261746f72000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526021908201527f63616c6c6572206973206e6f74207468652066696e616e63654f70657261746f6040820152603960f91b606082015260800190565b6020808252602e908201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560408201526d195b881a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600b908201526a085a5cd0dbdb9d1c9858dd60aa1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b6040518181016001600160401b0381118282101715615e8e57600080fd5b604052919050565b60006001600160401b03821115615eab578081fd5b5060209081020190565b60006001600160401b03821115615eca578081fd5b50601f01601f191660200190565b60005b83811015615ef3578181015183820152602001615edb565b83811115612fcc5750506000910152565b6001600160a01b0381168114610ec057600080fd5b8015158114610ec057600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c634300060c000a" +} diff --git a/deployments/polygon/opUSDCgrow_Proxy.json b/deployments/polygon/opUSDCgrow_Proxy.json new file mode 100644 index 000000000..764c3b389 --- /dev/null +++ b/deployments/polygon/opUSDCgrow_Proxy.json @@ -0,0 +1,232 @@ +{ + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "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": "owner", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "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" + } + ], + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "receipt": { + "to": null, + "from": "0xD26Ec7401C198ADAc340d3A4Cb8B52b845F3A542", + "contractAddress": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "transactionIndex": 11, + "gasUsed": "830308", + "logsBloom": "0x00000000000008000000000000000000000000000001000400800000000000000000000000000000001400000000000000008010000000000000000000000000000000000000000000000000000000800001000000000000000100000040000008000000020000000000000000000800000000000000000080000004000100400000000000000000000000000000000000000020000000000000000000000000200000000000000000000000000200000000000200000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000100400000000000000000000000000200000102000100000", + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200", + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "logs": [ + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000003ef67348e102718e3d18bde2d9482f53c5354ee5" + ], + "data": "0x", + "logIndex": 33, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + }, + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x7FeA9Dc468855B999389E396BdB1e3EbF6d19E83", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000320305a31dd2af0195c66f733662646a74c09c4f" + ], + "data": "0x", + "logIndex": 34, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + }, + { + "transactionIndex": 11, + "blockNumber": 26876093, + "transactionHash": "0x6b1ba70e781b92334ade5c45eb11e6d78e5da80c404b609561b208eef2a9dd4c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000d26ec7401c198adac340d3a4cb8b52b845f3a542", + "0x000000000000000000000000b9ede6f94d192073d8eaf85f8db677133d483249" + ], + "data": "0x00000000000000000000000000000000000000000000000000937e094cd142f800000000000000000000000000000000000000000000000022576c9342cb78000000000000000000000000000000000000000000000005a7cc007e2660dc0c2f00000000000000000000000000000000000000000000000021c3ee89f5fa35080000000000000000000000000000000000000000000005a7cc93fc2fadad4f27", + "logIndex": 35, + "blockHash": "0xe0a42f969f61632f234c325c59a9aac79abc7423de879356e513048844d27200" + } + ], + "blockNumber": 26876093, + "cumulativeGasUsed": "1971573", + "status": 1, + "byzantium": true + }, + "args": [ + "0x3Ef67348E102718e3d18bde2d9482f53c5354EE5", + "0x320305A31dd2aF0195C66F733662646a74C09C4F", + "0x76e57d0300000000000000000000000032bd1a6fdaec327b57cdb2cfde0855afb3255d7cc2851064805ec339e3448aa6a11e612938131e6f0637ddf761ae5e5cfeee599600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f5553444320436f696e2028506f5329000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000" + ], + "solcInputHash": "2db89642daf7ebd20cbbef9f4540b20d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"owner\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"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\":{\"solc_0.7/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setOwner(ownerAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\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 transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x7f9bbb686cd29ade05acf0cec1bfded16f0ad8d7e3fcb9cf35cc8b04efdda744\",\"license\":\"MIT\"},\"solc_0.7/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\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) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\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\":\"0xfa071ffed5c967384ac4787576322a46a4863d89bf39cd6fde58d4780b42e0ed\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051610bed380380610bed8339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b506040525050506100f1838261010260201b60201c565b6100fa82610225565b505050610299565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610220576000836001600160a01b0316836040518082805190602001908083835b602083106101a55780518252601f199092019160209182019101610186565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610205576040519150601f19603f3d011682016040523d82523d6000602084013e61020a565b606091505b505090508061021e573d806000803e806000fd5b505b505050565b600061022f610286565b905081600080516020610bcd83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080516020610bcd8339815191525490565b610925806102a86000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101745780638da5cb5b14610201578063f2fde38b1461023f576100ca565b806301ffc9a7146100d45780633659cfe614610134576100ca565b366100ca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a4543544544000000000000000000000000000000000000604482015290519081900360640190fd5b6100d261027f565b005b3480156100e057600080fd5b50610120600480360360208110156100f757600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166102ca565b604080519115158252519081900360200190f35b34801561014057600080fd5b506100d26004803603602081101561015757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661048d565b6100d26004803603604081101561018a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111640100000000831117156101f657600080fd5b50909250905061054a565b34801561020d57600080fd5b50610216610630565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561024b57600080fd5b506100d26004803603602081101561026257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661063f565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156102c0578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061035d57507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561036a57506001610488565b7fffffffff00000000000000000000000000000000000000000000000000000000808316141561039c57506000610488565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000085166004820152905173ffffffffffffffffffffffffffffffffffffffff8316916301ffc9a7916024808301926020929190829003018186803b15801561044c57600080fd5b505afa92505050801561047157506040513d602081101561046c57600080fd5b505160015b61047f576000915050610488565b91506104889050565b919050565b6104956106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461052e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b610547816040518060200160405280600081525061070e565b50565b6105526106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61062b8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061070e92505050565b505050565b600061063a6106e9565b905090565b6106476106e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b61054781610862565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561062b5760008373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106107e957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107ac565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610849576040519150601f19603f3d011682016040523d82523d6000602084013e61084e565b606091505b50509050806102c4573d806000803e806000fd5b600061086c6106e9565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505056fea26469706673582212208c8442845e51519fe66269cee8fe054b83b7617dbcd8cf4d60740d273fa0b8a464736f6c63430007060033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/polygon/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json b/deployments/polygon/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json new file mode 100644 index 000000000..965551510 --- /dev/null +++ b/deployments/polygon/solcInputs/2db89642daf7ebd20cbbef9f4540b20d.json @@ -0,0 +1,39 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.7/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setOwner(ownerAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\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 transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.7/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\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(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\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) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\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" + }, + "solc_0.7/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts index 8c878d869..6751d6af4 100644 --- a/helper-hardhat-config.ts +++ b/helper-hardhat-config.ts @@ -65,7 +65,7 @@ export const NETWORKS_DEFAULT_GAS: iEVMParamsPerNetwork = { [eEVMNetwork.mainnet]: "auto", [eEVMNetwork.hardhat]: "auto", [eEVMNetwork.staging]: "auto", - [eEVMNetwork.polygon]: 30 * GWEI, + [eEVMNetwork.polygon]: 50 * GWEI, [eEVMNetwork.avalanche]: 65 * GWEI, [eEVMNetwork.mumbai]: 30 * GWEI, [eEVMNetwork.ganache]: "auto", From 70f7c14b42ba235a2ea96d50bf82c84aea30d0b4 Mon Sep 17 00:00:00 2001 From: dhruvinparikh Date: Sat, 9 Apr 2022 17:56:47 -0400 Subject: [PATCH 52/52] build(tsconfig): use regex to include files --- .eslintignore | 11 +---------- .prettierignore | 11 +---------- .solhintignore | 11 +---------- tsconfig.json | 7 ++----- 4 files changed, 5 insertions(+), 35 deletions(-) diff --git a/.eslintignore b/.eslintignore index 670eccb77..7167fc07c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -9,16 +9,7 @@ node_modules/ typechain/ specification_docs/ deployments/ -contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/adapters/defi-adapters -contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter -contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter -contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter -contracts/protocol/adapters/polygon/curve-polygon-adapter -contracts/protocol/adapters/polygon/aave-polygon-adapter -contracts/protocol/adapters/polygon/sushiswap_pools_adapter -contracts/protocol/adapters/polygon/quickswap-pool-polygon -contracts/protocol/adapters/polygon/apeswap-pool-polygon +contracts/protocol/adapters # files .solcover.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 39ab90c67..aa72956ef 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,17 +11,8 @@ **/node_modules **/typechain **/specification_docs -contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/adapters/defi-adapters -contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter -contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter -contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter -contracts/protocol/adapters/polygon/curve-polygon-adapter -contracts/protocol/adapters/polygon/aave-polygon-adapter -contracts/protocol/adapters/polygon/sushiswap_pools_adapter -contracts/protocol/adapters/polygon/quickswap-pool-polygon -contracts/protocol/adapters/polygon/apeswap-pool-polygon +contracts/protocol/adapters # files *.env diff --git a/.solhintignore b/.solhintignore index efcdc7e66..9e4b82f92 100644 --- a/.solhintignore +++ b/.solhintignore @@ -6,14 +6,5 @@ contracts/libraries/ contracts/utils/ contracts/dependencies/ contracts/mocks/ -contracts/protocol/adapters/ethereum/team-defi-adapters contracts/protocol/earn-protocol-configuration -contracts/protocol/adapters/defi-adapters -contracts/protocol/adapters/ethereum/curve-metapool-deposit-adapter -contracts/protocol/adapters/ethereum/curve-metapool-gauge-adapter -contracts/protocol/adapters/ethereum/curve-metapool-swap-adapter -contracts/protocol/adapters/polygon/curve-polygon-adapter -contracts/protocol/adapters/polygon/aave-polygon-adapter -contracts/protocol/adapters/polygon/sushiswap_pools_adapter -contracts/protocol/adapters/polygon/quickswap-pool-polygon -contracts/protocol/adapters/polygon/apeswap-pool-polygon \ No newline at end of file +contracts/protocol/adapters \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 1a1fbdd50..5b37f895c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,11 +25,8 @@ "typechain/**/*.d.ts", "typechain/**/*.ts", "optyfi-sdk/**/*.ts", - "deploy_kovan/**/*.ts", - "deploy_mainnet/**/*.ts", - "deploy_mumbai/**/*.ts", - "deploy_polygon/**/*.ts", "scripts/**/*.ts", - "deploy/**/*.ts" + "deploy/**/*.ts", + "deploy_*/**/*.ts" ] }