From ceb70bef4711b36b8f85a45712552f3845163063 Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Thu, 30 Nov 2023 15:58:57 -0500 Subject: [PATCH 1/5] enable sepolia and base chains --- .env.sample | 1 + deploy/003_deploy_b_factory.ts | 22 ----------- hardhat.config.ts | 30 +++++++++++++++ package.json | 1 + src/addresses/deployed.ts | 6 +++ src/addresses/setup.ts | 69 ++++++++++++++++++++-------------- yarn.lock | 14 +++++++ 7 files changed, 93 insertions(+), 50 deletions(-) diff --git a/.env.sample b/.env.sample index 7612f94..0bc6fd3 100644 --- a/.env.sample +++ b/.env.sample @@ -6,5 +6,6 @@ GNOSISSCAN_API_KEY= POLYGONSCAN_API-KEY= OPTIMISTICSCAN_API_KEY= ARBISCAN_API_KEY= +BASESCAN_API_KEY= REPORT_GAS=false COINMARKETCAP_API_KEY= \ No newline at end of file diff --git a/deploy/003_deploy_b_factory.ts b/deploy/003_deploy_b_factory.ts index 7bb2589..263410a 100644 --- a/deploy/003_deploy_b_factory.ts +++ b/deploy/003_deploy_b_factory.ts @@ -3,28 +3,6 @@ import { DeployFunction } from 'hardhat-deploy/types'; import { getSetupAddresses } from '../src/addresses/setup'; -const networkName = { - 4: 'Rinkeby', - 5: 'Goerli', - 1: 'mainnet', - 137: 'matic', - 42: 'kovan', - 100: 'gnosis', - 42161: 'arbitrum', - 10: 'optimism' -}; - -const networkCurrency = { - 4: 'ETH', - 5: 'ETH', - 1: 'ETH', - 137: 'matic', - 42: 'ETH', - 100: 'xDai', - 42161: 'ETH', - 10: 'ETH' -}; - const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, ethers, getChainId, getNamedAccounts, network } = hre; diff --git a/hardhat.config.ts b/hardhat.config.ts index 7f696ad..d6b6e61 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -60,6 +60,8 @@ const explorerApiKey = (networkName: string) => { return process.env.OPTIMISTICSCAN_API_KEY; case "arbitrumOne": return process.env.ARBISCAN_API_KEY; + case "base": + return process.env.BASESCAN_API_KEY; default: break; } @@ -103,6 +105,22 @@ const config: HardhatUserConfig = { }, }, }, + sepolia: { + url: `https://sepolia.infura.io/v3/${infuraKey()}`, + // gas: 5000000, + // gasPrice: 100000000000, + // gasMultiplier: 2, + accounts: process.env.ACCOUNT_PK + ? [process.env.ACCOUNT_PK] + : { + mnemonic: mnemonic(), + }, + verify: { + etherscan: { + apiKey: explorerApiKey('ethereum'), + }, + }, + }, xdai: { url: "https://rpc.gnosischain.com/", gas: 5000000, @@ -173,6 +191,17 @@ const config: HardhatUserConfig = { }, }, }, + base: { + url: `https://mainnet.base.org`, + accounts: { + mnemonic: mnemonic(), + }, + verify: { + etherscan: { + apiKey: explorerApiKey('base'), + }, + }, + }, }, etherscan: { // Your API key for Etherscan @@ -187,6 +216,7 @@ const config: HardhatUserConfig = { polygonMumbai: explorerApiKey('polygon'), arbitrumOne: explorerApiKey('arbitrumOne'), optimisticEthereum: explorerApiKey('optimism'), + base: explorerApiKey('base'), }, customChains: [ { diff --git a/package.json b/package.json index 8d08f46..20c2e0b 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "hardhat-contract-sizer": "^2.4.0", "hardhat-deploy": "^0.11.25", "hardhat-gas-reporter": "^1.0.9", + "safe-deployments": "^1.26.0", "shx": "^0.3.4", "solidity-coverage": "^0.8.2", "ts-node": "^10.0.0", diff --git a/src/addresses/deployed.ts b/src/addresses/deployed.ts index e3fa2a8..fc53a53 100644 --- a/src/addresses/deployed.ts +++ b/src/addresses/deployed.ts @@ -25,6 +25,9 @@ export const deployments = [ DAO:"0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", }, }, + sepolia: { + // TODO: + }, gnosis: { addresses: { lootSingleton: "0x0444AE984b9563C8480244693ED65F25B3C64a4E", @@ -85,6 +88,9 @@ export const deployments = [ DAO:"0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", }, }, + base: { + // TODO: + }, }, }, ]; diff --git a/src/addresses/setup.ts b/src/addresses/setup.ts index 5229ec6..eaf1f44 100644 --- a/src/addresses/setup.ts +++ b/src/addresses/setup.ts @@ -1,6 +1,13 @@ import { constants } from 'ethers'; import { Network } from 'hardhat/types'; import { DeploymentsExtension } from 'hardhat-deploy/types'; +import { + getCompatibilityFallbackHandlerDeployment, + getMultiSendDeployment, + getProxyFactoryDeployment, + getSafeSingletonDeployment, +} from 'safe-deployments'; +import { ContractVersions, SupportedNetworks } from '@gnosis.pm/zodiac'; export type ContractSetup = { gnosisSingleton: string; @@ -12,6 +19,18 @@ export type ContractSetup = { DAO: string; } +const DAO_ADDRESS: {[name: string]: string} = { + mainnet: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + goerli: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + sepolia: "", // TODO: + gnosis: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + polygon: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + polygonMumbai: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + arbitrumOne: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", + optimisticEthereum: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", + base: "", // TODO: +}; + export const getSetupAddresses = async ( chainId: string, network: Network, @@ -31,36 +50,30 @@ export const getSetupAddresses = async ( }; } - // same default for all networks, but different sometimes - // https://github.com/gnosis/zodiac/blob/master/src/factory/constants.ts#L20 - // https://github.com/safe-global/safe-deployments/tree/main/src/assets - // moduleProxyFactory https://github.com/gnosis/zodiac/blob/master/src/factory/constants.ts#L21 + const filter = { network: chainId, version: '1.3.0' }; - if (chainId !== '10') { // Optimism - return { - gnosisSingleton: "0xd9db270c1b5e3bd161e8c8503c55ceabee709552", - gnosisFallbackLibrary: "0xf48f2b2d2a534e402487b3ee7c18c33aec0fe5e4", - gnosisMultisendLibrary: "0xa238cbeb142c10ef7ad8442c6d1f9e89e07e7761", - poster: "0x000000000000cd17345801aa8147b8D3950260FF", - gnosisSafeProxyFactory: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2", - moduleProxyFactory: "0x00000000000DC7F163742Eb4aBEf650037b1f588", - DAO: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315" // Change to Daohaus protocol zodiac baal avatar - }; - } + const gnosisSingleton = getSafeSingletonDeployment(filter)?.networkAddresses[chainId]; + const gnosisFallbackLibrary = getCompatibilityFallbackHandlerDeployment(filter)?.networkAddresses[chainId]; + const gnosisMultisendLibrary = getMultiSendDeployment(filter)?.networkAddresses[chainId]; + const gnosisSafeProxyFactory = getProxyFactoryDeployment(filter)?.networkAddresses[chainId]; + // TODO: Zodiac is not deployed on Base network + const moduleProxyFactory = Object.values(SupportedNetworks).includes(Number(chainId)) + ? ContractVersions[Number(chainId) as SupportedNetworks]?.factory?.['1.1.0'] + : undefined; + const poster = '0x000000000000cd17345801aa8147b8D3950260FF'; + + if (!gnosisSingleton || !gnosisFallbackLibrary || !gnosisMultisendLibrary || !gnosisSafeProxyFactory) + throw new Error(`Safe infra not found for network ${network.name}`); + if (!moduleProxyFactory) + throw new Error(`Zodiac infra not found for network ${network.name}`); - // Optimism ONLY - // Safe singleton: 0x69f4D1788e39c87893C980c06EdF4b7f686e2938 - // fall back: 0x017062a1dE2FE6b99BE3d9d37841FeD19F573804 - // multisend: 0x998739BFdAAdde7C933B942a68053933098f9EDa - // GnosisSafeProxyFactory: 0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC - // DAO: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4" return { - gnosisSingleton: "0x69f4D1788e39c87893C980c06EdF4b7f686e2938", - gnosisFallbackLibrary: "0x017062a1dE2FE6b99BE3d9d37841FeD19F573804", - gnosisMultisendLibrary: "0x998739BFdAAdde7C933B942a68053933098f9EDa", - poster: "0x000000000000cd17345801aa8147b8D3950260FF", - gnosisSafeProxyFactory: "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC", - moduleProxyFactory: "0x00000000000DC7F163742Eb4aBEf650037b1f588", - DAO: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4" // Change to Daohaus protocol zodiac baal avatar + gnosisSingleton, + gnosisFallbackLibrary, + gnosisMultisendLibrary, + gnosisSafeProxyFactory, + moduleProxyFactory: '', + poster, + DAO: DAO_ADDRESS[network.name], }; }; diff --git a/yarn.lock b/yarn.lock index 061286d..3ba58ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4187,6 +4187,13 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-deployments@^1.26.0: + version "1.26.0" + resolved "https://registry.yarnpkg.com/safe-deployments/-/safe-deployments-1.26.0.tgz#ac93849dfe187d5abe4f448a113ffac5ca2bd4b6" + integrity sha512-JuUfoN86/JPmmGAxxVj73Q0G7Pkon3tZMu7IgWWd4SSPk4bvoSJCaQBOHFKRu10x2+KQUtK+xz0JIua6QB6niA== + dependencies: + semver "^7.3.7" + "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -4248,6 +4255,13 @@ semver@^7.3.4: dependencies: lru-cache "^6.0.0" +semver@^7.3.7: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" From 92334b29ff45874680841d272123270228005eca Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Sun, 3 Dec 2023 22:39:02 -0500 Subject: [PATCH 2/5] update deploy scripts --- deploy/003_deploy_b_factory.ts | 6 +++--- deploy/004_deploy_bv_factory.ts | 8 ++++---- deploy/005_deploy_bt_factory.ts | 4 ++-- hardhat.config.ts | 17 ++++++++--------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/deploy/003_deploy_b_factory.ts b/deploy/003_deploy_b_factory.ts index 263410a..b6e0423 100644 --- a/deploy/003_deploy_b_factory.ts +++ b/deploy/003_deploy_b_factory.ts @@ -12,8 +12,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const _addresses = await getSetupAddresses(chainId, network, deployments); - if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') { - console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO); + if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') { + console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO); return; } @@ -52,7 +52,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { from: deployer, args: [], proxy: { - proxyContract: 'OpenZeppelinTransparentProxy', + proxyContract: 'UUPS', methodName: 'initialize', }, log: true, diff --git a/deploy/004_deploy_bv_factory.ts b/deploy/004_deploy_bv_factory.ts index 786035f..0ad5cc3 100644 --- a/deploy/004_deploy_bv_factory.ts +++ b/deploy/004_deploy_bv_factory.ts @@ -11,8 +11,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const _addresses = await getSetupAddresses(chainId, network, deployments); - if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') { - console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO); + if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') { + console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO); return; } @@ -26,6 +26,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deploy } = deployments; const baalSummoner = await deployments.get('BaalSummoner'); + console.log('BaalSummoner address', baalSummoner.address); const summonerDeeployed = await deploy('BaalAndVaultSummoner', { contract: 'BaalAndVaultSummoner', @@ -48,8 +49,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if (network.name !== 'hardhat') { - console.log("BaalAndVaultSummoner transferOwnership to", _addresses.DAO); - // await baalAndVaultSummoner.transferOwnership(_addresses.DAO); + console.log("BaalAndVaultSummoner transferOwnership to", _addresses.DAO); const tx_4 = await deployments.execute('BaalAndVaultSummoner', { from: deployer, }, 'transferOwnership', diff --git a/deploy/005_deploy_bt_factory.ts b/deploy/005_deploy_bt_factory.ts index 9cc4158..9e04ab4 100644 --- a/deploy/005_deploy_bt_factory.ts +++ b/deploy/005_deploy_bt_factory.ts @@ -15,8 +15,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const _addresses = await getSetupAddresses(chainId, network, deployments); - if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') { - console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO); + if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') { + console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO); return; } diff --git a/hardhat.config.ts b/hardhat.config.ts index d6b6e61..6c4427d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -227,15 +227,14 @@ const config: HardhatUserConfig = { browserURL: "https://gnosisscan.io/", }, }, - // can only have one chainId 100 at a time - // { - // network: "xdai", - // chainId: 100, - // urls: { - // apiURL: "https://blockscout.com/xdai/mainnet/api", - // browserURL: "https://blockscout.com/xdai/mainnet/", - // } - // } + { + network: "base", + chainId: 8453, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org", + } + }, ] }, solidity: { From 0ca5d73dfdf850a185cbd8860b5d688e66356dac Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Sun, 3 Dec 2023 22:40:34 -0500 Subject: [PATCH 3/5] deploy contracts on base & sepolia --- deployments/base/.chainId | 1 + deployments/base/Baal.json | 2362 +++++++++++++++++ deployments/base/BaalAdvTokenSummoner.json | 375 +++ .../BaalAdvTokenSummoner_Implementation.json | 455 ++++ .../base/BaalAdvTokenSummoner_Proxy.json | 158 ++ deployments/base/BaalAndVaultSummoner.json | 593 +++++ .../BaalAndVaultSummoner_Implementation.json | 747 ++++++ .../base/BaalAndVaultSummoner_Proxy.json | 158 ++ deployments/base/BaalSummoner.json | 666 +++++ .../base/BaalSummoner_Implementation.json | 785 ++++++ deployments/base/BaalSummoner_Proxy.json | 158 ++ deployments/base/Loot.json | 1186 +++++++++ deployments/base/Shares.json | 1624 ++++++++++++ deployments/base/TributeMinion.json | 355 +++ .../0e89febeebc7444140de8e67c9067d2c.json | 80 + .../928daf6847beb441da40e990eb20d125.json | 284 ++ .../d833871936d16a85338aeeebf4887b62.json | 302 +++ deployments/sepolia/.chainId | 1 + deployments/sepolia/Baal.json | 2362 +++++++++++++++++ deployments/sepolia/BaalAdvTokenSummoner.json | 375 +++ .../BaalAdvTokenSummoner_Implementation.json | 455 ++++ .../sepolia/BaalAdvTokenSummoner_Proxy.json | 158 ++ deployments/sepolia/BaalAndVaultSummoner.json | 593 +++++ .../BaalAndVaultSummoner_Implementation.json | 747 ++++++ .../sepolia/BaalAndVaultSummoner_Proxy.json | 158 ++ deployments/sepolia/BaalSummoner.json | 666 +++++ .../sepolia/BaalSummoner_Implementation.json | 785 ++++++ deployments/sepolia/BaalSummoner_Proxy.json | 158 ++ deployments/sepolia/Loot.json | 1186 +++++++++ deployments/sepolia/Shares.json | 1624 ++++++++++++ deployments/sepolia/TributeMinion.json | 355 +++ .../0e89febeebc7444140de8e67c9067d2c.json | 80 + .../928daf6847beb441da40e990eb20d125.json | 284 ++ .../d833871936d16a85338aeeebf4887b62.json | 302 +++ src/addresses/deployed.ts | 22 +- src/addresses/setup.ts | 11 +- 36 files changed, 20604 insertions(+), 7 deletions(-) create mode 100644 deployments/base/.chainId create mode 100644 deployments/base/Baal.json create mode 100644 deployments/base/BaalAdvTokenSummoner.json create mode 100644 deployments/base/BaalAdvTokenSummoner_Implementation.json create mode 100644 deployments/base/BaalAdvTokenSummoner_Proxy.json create mode 100644 deployments/base/BaalAndVaultSummoner.json create mode 100644 deployments/base/BaalAndVaultSummoner_Implementation.json create mode 100644 deployments/base/BaalAndVaultSummoner_Proxy.json create mode 100644 deployments/base/BaalSummoner.json create mode 100644 deployments/base/BaalSummoner_Implementation.json create mode 100644 deployments/base/BaalSummoner_Proxy.json create mode 100644 deployments/base/Loot.json create mode 100644 deployments/base/Shares.json create mode 100644 deployments/base/TributeMinion.json create mode 100644 deployments/base/solcInputs/0e89febeebc7444140de8e67c9067d2c.json create mode 100644 deployments/base/solcInputs/928daf6847beb441da40e990eb20d125.json create mode 100644 deployments/base/solcInputs/d833871936d16a85338aeeebf4887b62.json create mode 100644 deployments/sepolia/.chainId create mode 100644 deployments/sepolia/Baal.json create mode 100644 deployments/sepolia/BaalAdvTokenSummoner.json create mode 100644 deployments/sepolia/BaalAdvTokenSummoner_Implementation.json create mode 100644 deployments/sepolia/BaalAdvTokenSummoner_Proxy.json create mode 100644 deployments/sepolia/BaalAndVaultSummoner.json create mode 100644 deployments/sepolia/BaalAndVaultSummoner_Implementation.json create mode 100644 deployments/sepolia/BaalAndVaultSummoner_Proxy.json create mode 100644 deployments/sepolia/BaalSummoner.json create mode 100644 deployments/sepolia/BaalSummoner_Implementation.json create mode 100644 deployments/sepolia/BaalSummoner_Proxy.json create mode 100644 deployments/sepolia/Loot.json create mode 100644 deployments/sepolia/Shares.json create mode 100644 deployments/sepolia/TributeMinion.json create mode 100644 deployments/sepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json create mode 100644 deployments/sepolia/solcInputs/928daf6847beb441da40e990eb20d125.json create mode 100644 deployments/sepolia/solcInputs/d833871936d16a85338aeeebf4887b62.json diff --git a/deployments/base/.chainId b/deployments/base/.chainId new file mode 100644 index 0000000..2a0c263 --- /dev/null +++ b/deployments/base/.chainId @@ -0,0 +1 @@ +8453 \ No newline at end of file diff --git a/deployments/base/Baal.json b/deployments/base/Baal.json new file mode 100644 index 0000000..217a495 --- /dev/null +++ b/deployments/base/Baal.json @@ -0,0 +1,2362 @@ +{ + "address": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guard_", + "type": "address" + } + ], + "name": "NotIERC165Compliant", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousAvatar", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAvatar", + "type": "address" + } + ], + "name": "AvatarSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + } + ], + "name": "CancelProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "guard", + "type": "address" + } + ], + "name": "ChangedGuard", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "voting", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "grace", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOffering", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quorum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sponsor", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minRetention", + "type": "uint256" + } + ], + "name": "GovernanceConfigSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "adminLock", + "type": "bool" + } + ], + "name": "LockAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "governorLock", + "type": "bool" + } + ], + "name": "LockGovernor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "managerLock", + "type": "bool" + } + ], + "name": "LockManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "LootPaused", + "type": "event" + }, + { + "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": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "passed", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "actionFailed", + "type": "bool" + } + ], + "name": "ProcessProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lootToBurn", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "sharesToBurn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "Ragequit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "SetTrustedForwarder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "lootPaused", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "sharesPaused", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "gracePeriod", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalOffering", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quorumPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sponsorThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minRetentionPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalShares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalLoot", + "type": "uint256" + } + ], + "name": "SetupComplete", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "shaman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "permission", + "type": "uint256" + } + ], + "name": "ShamanSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "SharesPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "votingStarts", + "type": "uint256" + } + ], + "name": "SponsorProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "proposalDataHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "selfSponsor", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "SubmitProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "SubmitVote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousTarget", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTarget", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [], + "name": "adminLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "avatar", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "from", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "burnLoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "from", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "burnShares", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "cancelProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeAsBaal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuard", + "outputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "getProposalStatus", + "outputs": [ + { + "internalType": "bool[4]", + "name": "", + "type": "bool[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governorLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gracePeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guard", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_transactions", + "type": "bytes" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isAdmin", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isGovernor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isManager", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestSponsoredProposalId", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lockAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lockGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lockManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootToken", + "outputs": [ + { + "internalType": "contract IBaalToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "managerLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "memberVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minRetentionPercent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "mintLoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "mintShares", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "multisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + } + ], + "name": "processProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proposalCount", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalOffering", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "prevProposalId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingStarts", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEnds", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "graceEnds", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotalSharesAndLootAtVote", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotalSharesAtSponsor", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "proposalDataHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumPercent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sharesToBurn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lootToBurn", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "ragequit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "pauseShares", + "type": "bool" + }, + { + "internalType": "bool", + "name": "pauseLoot", + "type": "bool" + } + ], + "name": "setAdminConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_avatar", + "type": "address" + } + ], + "name": "setAvatar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_governanceConfig", + "type": "bytes" + } + ], + "name": "setGovernanceConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "name": "setGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_shamans", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_permissions", + "type": "uint256[]" + } + ], + "name": "setShamans", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedForwarderAddress", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initializationParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "shamans", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sharesToken", + "outputs": [ + { + "internalType": "contract IBaalToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "sponsorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sponsorThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum Baal.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "submitProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "submitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "submitVoteWithSig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "target", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLoot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "votingNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x26dcbeb0849723a20745216ac3399a13f37d3c0b34b558e37ec8567f24f130df", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "transactionIndex": 6, + "gasUsed": "5162353", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x74c99951139585e994f604d9f9beda17e2b6e78972791cf758f558cb3838be14", + "transactionHash": "0x26dcbeb0849723a20745216ac3399a13f37d3c0b34b558e37ec8567f24f130df", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 7428456, + "transactionHash": "0x26dcbeb0849723a20745216ac3399a13f37d3c0b34b558e37ec8567f24f130df", + "address": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 25, + "blockHash": "0x74c99951139585e994f604d9f9beda17e2b6e78972791cf758f558cb3838be14" + } + ], + "blockNumber": 7428456, + "cumulativeGasUsed": "6222177", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "928daf6847beb441da40e990eb20d125", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guard_\",\"type\":\"address\"}],\"name\":\"NotIERC165Compliant\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAvatar\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAvatar\",\"type\":\"address\"}],\"name\":\"AvatarSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"}],\"name\":\"CancelProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"ChangedGuard\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"voting\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"grace\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newOffering\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sponsor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minRetention\",\"type\":\"uint256\"}],\"name\":\"GovernanceConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"adminLock\",\"type\":\"bool\"}],\"name\":\"LockAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"governorLock\",\"type\":\"bool\"}],\"name\":\"LockGovernor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"managerLock\",\"type\":\"bool\"}],\"name\":\"LockManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"LootPaused\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"passed\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"actionFailed\",\"type\":\"bool\"}],\"name\":\"ProcessProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"lootToBurn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"sharesToBurn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"Ragequit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"SetTrustedForwarder\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"lootPaused\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"sharesPaused\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gracePeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposalOffering\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sponsorThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minRetentionPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalLoot\",\"type\":\"uint256\"}],\"name\":\"SetupComplete\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"permission\",\"type\":\"uint256\"}],\"name\":\"ShamanSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"SharesPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"votingStarts\",\"type\":\"uint256\"}],\"name\":\"SponsorProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalDataHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votingPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"selfSponsor\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"SubmitProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"SubmitVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousTarget\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTarget\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adminLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avatar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"from\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"burnLoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"from\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"burnShares\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"cancelProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_calls\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"encodeMultisend\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedMultisend\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeAsBaal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGuard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"getProposalStatus\",\"outputs\":[{\"internalType\":\"bool[4]\",\"name\":\"\",\"type\":\"bool[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governorLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gracePeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_transactions\",\"type\":\"bytes\"}],\"name\":\"hashOperation\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSponsoredProposalId\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lootToken\",\"outputs\":[{\"internalType\":\"contract IBaalToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"memberVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minRetentionPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"mintLoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"mintShares\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multisendLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"}],\"name\":\"processProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposalCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposalOffering\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"prevProposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingStarts\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEnds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"graceEnds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTotalSharesAndLootAtVote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTotalSharesAtSponsor\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"proposalDataHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sharesToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lootToBurn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"ragequit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pauseShares\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"pauseLoot\",\"type\":\"bool\"}],\"name\":\"setAdminConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"setAvatar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_governanceConfig\",\"type\":\"bytes\"}],\"name\":\"setGovernanceConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"name\":\"setGuard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_shamans\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_permissions\",\"type\":\"uint256[]\"}],\"name\":\"setShamans\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_trustedForwarderAddress\",\"type\":\"address\"}],\"name\":\"setTrustedForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initializationParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"shamans\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharesToken\",\"outputs\":[{\"internalType\":\"contract IBaalToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"sponsorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sponsorThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum Baal.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"submitProposal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"submitVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"submitVoteWithSig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalLoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"versionRecipient\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"votingNonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"burnLoot(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to burn\",\"from\":\"Array of addresses to lose loot\"}},\"burnShares(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to burn\",\"from\":\"Array of addresses to lose shares\"}},\"cancelProposal(uint32)\":{\"details\":\"Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\",\"params\":{\"id\":\"Number of proposal in `proposals` mapping to process for execution.\"}},\"executeAsBaal(address,uint256,bytes)\":{\"details\":\"Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\",\"params\":{\"_data\":\"arbitrary transaction data\",\"_to\":\"address to call\",\"_value\":\"value to include in wei\"}},\"getProposalStatus(uint32)\":{\"params\":{\"id\":\"Number of proposal in proposals\"},\"returns\":{\"_0\":\"[cancelled, processed, passed, actionFailed]\"}},\"isAdmin(address)\":{\"params\":{\"shaman\":\"Address attempting to execute admin permissioned functions\"}},\"isGovernor(address)\":{\"params\":{\"shaman\":\"Address attempting to execute governor permissioned functions\"}},\"isManager(address)\":{\"params\":{\"shaman\":\"Address attempting to execute manager permissioned functions\"}},\"mintLoot(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to mint\",\"to\":\"Array of addresses to mint loot\"}},\"mintShares(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to mint\",\"to\":\"Array of addresses to receive shares\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"processProposal(uint32,bytes)\":{\"details\":\"Proposal must have succeeded, not been processed, not expired, retention threshold must be met\",\"params\":{\"id\":\"Number of proposal in `proposals` mapping to process for execution.\",\"proposalData\":\"Packed multisend data to execute via Gnosis multisend library\"}},\"ragequit(address,uint256,uint256,address[])\":{\"params\":{\"lootToBurn\":\"Baal pure economic weight to burn.\",\"sharesToBurn\":\"Baal voting weight to burn.\",\"to\":\"Account that receives 'fair share'.\",\"tokens\":\"Array of tokens to include in rage quit calculation\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAdminConfig(bool,bool)\":{\"params\":{\"pauseLoot\":\"Turn loot transfers on or off\",\"pauseShares\":\"Turn share transfers on or off\"}},\"setAvatar(address)\":{\"details\":\"Sets the avatar to a new avatar (`newAvatar`).\"},\"setGovernanceConfig(bytes)\":{\"params\":{\"_governanceConfig\":\"Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\"}},\"setGuard(address)\":{\"details\":\"Set a guard that checks transactions before execution.\",\"params\":{\"_guard\":\"The address of the guard to be used or the 0 address to disable the guard.\"}},\"setShamans(address[],uint256[])\":{\"params\":{\"_permissions\":\"Permission level of each shaman in _shamans\",\"_shamans\":\"Addresses of shaman contracts\"}},\"setTarget(address)\":{\"details\":\"Sets the target to a new target (`newTarget`).\"},\"setTrustedForwarder(address)\":{\"params\":{\"_trustedForwarderAddress\":\"Trusted forwarder's address\"}},\"setUp(bytes)\":{\"params\":{\"_initializationParams\":\"Encoded setup information.\"}},\"sponsorProposal(uint32)\":{\"params\":{\"id\":\"Number of proposal in `proposals` mapping to sponsor.\"}},\"state(uint32)\":{\"params\":{\"id\":\"Number of proposal in proposals\"},\"returns\":{\"_0\":\"Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed \\\\-> Cancelled \\\\-> Defeated\"}},\"submitProposal(bytes,uint32,uint256,string)\":{\"params\":{\"details\":\"Context for proposal.\",\"proposalData\":\"Multisend encoded transactions or proposal data\"},\"returns\":{\"_0\":\"proposal Count for submitted proposal.\"}},\"submitVote(uint32,bool)\":{\"params\":{\"approved\":\"If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\",\"id\":\"Number of proposal in `proposals` mapping to cast vote on.\"}},\"submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)\":{\"params\":{\"approved\":\"If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\",\"expiry\":\"Expiration of signature.\",\"id\":\"Number of proposal in `proposals` mapping to cast vote on.\",\"r\":\"r in signature\",\"s\":\"s in signature\",\"v\":\"v in signature\",\"voter\":\"Address of member who submitted vote.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Baal ';_;'.\",\"version\":1},\"userdoc\":{\"errors\":{\"NotIERC165Compliant(address)\":[{\"notice\":\"`guard_` does not implement IERC165.\"}]},\"kind\":\"user\",\"methods\":{\"burnLoot(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to burn loot.\"},\"burnShares(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to burn shares.\"},\"cancelProposal(uint32)\":{\"notice\":\"Cancel proposal prior to execution\"},\"executeAsBaal(address,uint256,bytes)\":{\"notice\":\"Can only be called by the avatar which means this can only be called if passed by another proposal or by a delegated signer on the Safe\"},\"getProposalStatus(uint32)\":{\"notice\":\"Helper to get recorded proposal flags\"},\"hashOperation(bytes)\":{\"notice\":\"Returns the keccak256 hash of calldata\"},\"isAdmin(address)\":{\"notice\":\"Helper to check if shaman permission contains admin capabilities\"},\"isGovernor(address)\":{\"notice\":\"Helper to check if shaman permission contains governor capabilities\"},\"isManager(address)\":{\"notice\":\"Helper to check if shaman permission contains manager capabilities\"},\"isTrustedForwarder(address)\":{\"notice\":\"return if the forwarder is trusted to forward relayed transactions to us. the forwarder is required to verify the sender's signature, and verify the call is not a replay.\"},\"lockAdmin()\":{\"notice\":\"Lock admin so setShamans cannot be called with admin changes\"},\"lockGovernor()\":{\"notice\":\"Lock governor so setShamans cannot be called with governor changes\"},\"lockManager()\":{\"notice\":\"Lock manager so setShamans cannot be called with manager changes\"},\"mintLoot(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to mint loot.\"},\"mintShares(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to mint shares.\"},\"processProposal(uint32,bytes)\":{\"notice\":\"Process `proposal` & execute internal functions.\"},\"ragequit(address,uint256,uint256,address[])\":{\"notice\":\"Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\"},\"setAdminConfig(bool,bool)\":{\"notice\":\"Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\"},\"setAvatar(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setGovernanceConfig(bytes)\":{\"notice\":\"Baal-or-governance-only function to change periods.\"},\"setShamans(address[],uint256[])\":{\"notice\":\"Baal-only function to set shaman status.\"},\"setTarget(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setTrustedForwarder(address)\":{\"notice\":\"Baal-or-governance only function to set trusted forwarder for meta-transactions.\"},\"setUp(bytes)\":{\"notice\":\"Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\"},\"sponsorProposal(uint32)\":{\"notice\":\"Sponsor proposal to Baal `members` for approval within voting period.\"},\"state(uint32)\":{\"notice\":\"State helper to determine proposal state\"},\"submitProposal(bytes,uint32,uint256,string)\":{\"notice\":\"Submit proposal to Baal `members` for approval within given voting period.\"},\"submitVote(uint32,bool)\":{\"notice\":\"Submit vote - proposal must exist & voting period must not have ended.\"},\"submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)\":{\"notice\":\"Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\"},\"totalLoot()\":{\"notice\":\"Helper to check total supply of child loot contract\"},\"totalShares()\":{\"notice\":\"Helper to check total supply of child shares contract\"},\"totalSupply()\":{\"notice\":\"Helper to check total supply of loot and shares\"}},\"notice\":\"Flexible guild contract inspired by Moloch DAO framework.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Baal.sol\":\"Baal\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615bef80620000f46000396000f3fe6080604052600436106103a25760003560e01c80638009ba1f116101e7578063cf043df31161010d578063ed0cdf15116100a0578063f460124d1161006f578063f460124d14610b99578063f81cbd2614610bb9578063fab514c014610bcf578063fe47668614610bef57600080fd5b8063ed0cdf1514610b19578063ee4d88ed14610b39578063f2fde38b14610b59578063f3ae241514610b7957600080fd5b8063da35c664116100dc578063da35c66414610a95578063da74222814610ab9578063e19a9dd914610ad9578063e43581b814610af957600080fd5b8063cf043df3146109fa578063d33defc714610a1a578063d4b8399214610a55578063d61f27ae14610a7557600080fd5b8063a4f9edbf11610185578063b634e4e011610154578063b634e4e014610979578063c00d077514610996578063c4e931f6146109bd578063c9106389146109dc57600080fd5b8063a4f9edbf14610904578063acca30a214610924578063b1e3f40c14610939578063b3c98bbb1461095957600080fd5b806398a527cc116101c157806398a527cc1461088a5780639a2f747f146108aa578063a06db7dc146108c0578063a26ec96e146108e457600080fd5b80638009ba1f1461083657806383bf8459146108565780638da5cb5b1461086c57600080fd5b80634526d846116102cc5780635ec286961161026a578063715018a611610239578063715018a6146107c3578063776d1a01146107d85780637ceab3b1146107f85780637da0a8771461081857600080fd5b80635ec286961461074e578063635e99aa1461076e57806367f61f0714610783578063706a6e93146107a357600080fd5b806352ba1da7116102a657806352ba1da7146106a4578063572b6c05146106d15780635aef7de6146107005780635cfd6f7e1461073857600080fd5b80634526d846146106355780634630affc14610655578063486ff0cd1461068257600080fd5b8063136d731a11610344578063258bfe2f11610313578063258bfe2f146105c05780633232444c146105e05780633a82ffc81461060d5780633a98ef391461062057600080fd5b8063136d731a1461055357806316fd265d1461056857806318160ddd1461057d57806324d7806c146105a057600080fd5b8063056b0dcd11610380578063056b0dcd146104d1578063086cfca8146104f35780630a796e19146105135780630f656a211461053357600080fd5b8063013cf08b146103a7578063027cdf451461046e57806302a251a314610498575b600080fd5b3480156103b357600080fd5b5061044c6103c2366004614d28565b60d9602052600090815260409020805460018201546002830154600384015460048501546005860154600787015460089097015463ffffffff80881698600160201b8904821698600160401b8104831698600160601b8204841698600160801b8304851698600160a01b90930490941696909593949193909290916001600160a01b03909116908d565b6040516104659d9c9b9a99989796959493929190614d41565b60405180910390f35b34801561047a57600080fd5b5060d5546104889060ff1681565b6040519015158152602001610465565b3480156104a457600080fd5b5060d0546104bc90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610465565b3480156104dd57600080fd5b506104f16104ec366004614ded565b610c1c565b005b3480156104ff57600080fd5b506104f161050e366004614e4b565b611127565b34801561051f57600080fd5b506104f161052e366004614e7a565b611181565b34801561053f57600080fd5b506104f161054e366004614ee2565b6114b5565b34801561055f57600080fd5b506104f1611763565b34801561057457600080fd5b506104f16117f4565b34801561058957600080fd5b5061059261186e565b604051908152602001610465565b3480156105ac57600080fd5b506104886105bb366004614e4b565b61188f565b3480156105cc57600080fd5b506105926105db366004615010565b6118d4565b3480156105ec57600080fd5b506105926105fb366004614e4b565b60d66020526000908152604090205481565b61059261061b36600461508d565b611904565b34801561062c57600080fd5b50610592611f55565b34801561064157600080fd5b506104f1610650366004614ee2565b611fc3565b34801561066157600080fd5b50610675610670366004614e7a565b612092565b604051610465919061511a565b34801561068e57600080fd5b50610697612103565b60405161046591906151a9565b3480156106b057600080fd5b506105926106bf366004614e4b565b60d86020526000908152604090205481565b3480156106dd57600080fd5b506104886106ec366004614e4b565b60ce546001600160a01b0391821691161490565b34801561070c57600080fd5b50606654610720906001600160a01b031681565b6040516001600160a01b039091168152602001610465565b34801561074457600080fd5b5061059260d35481565b34801561075a57600080fd5b506104f1610769366004614ee2565b612191565b34801561077a57600080fd5b50610592612260565b34801561078f57600080fd5b506104f161079e3660046151bc565b6122aa565b3480156107af57600080fd5b506104f16107be3660046151da565b6122ce565b3480156107cf57600080fd5b506104f16126ba565b3480156107e457600080fd5b506104f16107f3366004614e4b565b6126ce565b34801561080457600080fd5b50606554610720906001600160a01b031681565b34801561082457600080fd5b5060ce546001600160a01b0316610720565b34801561084257600080fd5b5060d054610720906001600160a01b031681565b34801561086257600080fd5b5061059260d45481565b34801561087857600080fd5b506033546001600160a01b0316610720565b34801561089657600080fd5b506104f16108a5366004614ee2565b612728565b3480156108b657600080fd5b5061059260d15481565b3480156108cc57600080fd5b5060d0546104bc90600160c01b900463ffffffff1681565b3480156108f057600080fd5b5060d5546104889062010000900460ff1681565b34801561091057600080fd5b506104f161091f366004615010565b6127f7565b34801561093057600080fd5b506104f1612d49565b34801561094557600080fd5b506104f1610954366004614ee2565b612dce565b34801561096557600080fd5b506104f161097436600461522e565b612e9d565b34801561098557600080fd5b5060da546104bc9063ffffffff1681565b3480156109a257600080fd5b5060da5461072090600160201b90046001600160a01b031681565b3480156109c957600080fd5b5060d55461048890610100900460ff1681565b3480156109e857600080fd5b506065546001600160a01b0316610720565b348015610a0657600080fd5b506104f1610a1536600461527d565b612f7e565b348015610a2657600080fd5b50610488610a35366004615306565b60d760209081526000928352604080842090915290825290205460ff1681565b348015610a6157600080fd5b50606754610720906001600160a01b031681565b348015610a8157600080fd5b50610697610a90366004615334565b613249565b348015610aa157600080fd5b5060d0546104bc90600160e01b900463ffffffff1681565b348015610ac557600080fd5b506104f1610ad4366004614e4b565b613310565b348015610ae557600080fd5b506104f1610af4366004614e4b565b6133bf565b348015610b0557600080fd5b50610488610b14366004614e4b565b6134c1565b348015610b2557600080fd5b506104f1610b34366004615408565b613502565b348015610b4557600080fd5b506104f1610b54366004615010565b613611565b348015610b6557600080fd5b506104f1610b74366004614e4b565b61386f565b348015610b8557600080fd5b50610488610b94366004614e4b565b6138e5565b348015610ba557600080fd5b5060cf54610720906001600160a01b031681565b348015610bc557600080fd5b5061059260d25481565b348015610bdb57600080fd5b506104f1610bea366004614e7a565b613925565b348015610bfb57600080fd5b50610c0f610c0a366004614e7a565b613aea565b6040516104659190615487565b6066546001600160a01b0316610c30613cc6565b6001600160a01b03161480610c4b5750610c4b6105bb613cc6565b610c8d5760405162461bcd60e51b815260206004820152600e60248201526d10b130b0b610131010b0b236b4b760911b60448201526064015b60405180910390fd5b818015610d0e575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c91906154a1565b155b15610db55760d060009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d6357600080fd5b505af1158015610d77573d6000803e3d6000fd5b5050604051600181527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a1610ed8565b81158015610e35575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3591906154a1565b15610ed85760d060009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b5050604051600081527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a15b808015610f59575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5791906154a1565b155b156110005760cf60009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fae57600080fd5b505af1158015610fc2573d6000803e3d6000fd5b5050604051600181527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb925060200190505b60405180910390a15050565b80158015611080575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108091906154a1565b156111235760cf60009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b5050604051600081527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb9250602001905060405180910390a15b5050565b61112f613cd0565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b611189613d49565b63ffffffff8116600090815260d96020526040902060d35460d0546001600160a01b0316639ab24eb06111ba613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122291906154be565b101561125b5760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600161126683613aea565b600781111561127757611277615471565b146112b15760405162461bcd60e51b815260206004820152600a602482015269085cdd589b5a5d1d195960b21b6044820152606401610c84565b8054600160a01b900463ffffffff161580611307575060d05463ffffffff600160c01b82048116916112ec91600160a01b90910416426154ed565b6112f691906154ed565b8154600160a01b900463ffffffff16115b61133d5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b805463ffffffff42818116600160401b026bffffffff00000000000000001984168117855560d08054600160a01b90819004851684018516600160601b0263ffffffff60601b1990931667ffffffffffffffff60401b19909616959095179190911780865590549384048316909101600160c01b9093048216929092018116600160801b0263ffffffff60801b1983168117845560da54600160201b92169190910267ffffffff000000001990911673ffffffff0000000000000000ffffffff000000001990921691909117178155611414613cc6565b6007820180546001600160a01b0319166001600160a01b039290921691909117905561143e61186e565b600482015561144b611f55565b600582015560da805463ffffffff191663ffffffff84169081179091554290611472613cc6565b6001600160a01b03167fd45ad122361f16d6f50d7c4a73638f20ee48eff6186af15224e2a4a1f6d5017160405160405180910390a4506114b26001609c55565b50565b6066546001600160a01b03166114c9613cc6565b6001600160a01b0316146114ef5760405162461bcd60e51b8152600401610c8490615505565b82811461150e5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57600083838381811061152d5761152d61554b565b60d5546020909102929092013592505060ff16156115aa5780600114158015611557575080600314155b8015611564575080600514155b8015611571575080600714155b6115aa5760405162461bcd60e51b815260206004820152600a60248201526961646d696e206c6f636b60b01b6044820152606401610c84565b60d554610100900460ff161561162157806002141580156115cc575080600314155b80156115d9575080600614155b80156115e6575080600714155b6116215760405162461bcd60e51b815260206004820152600c60248201526b6d616e61676572206c6f636b60a01b6044820152606401610c84565b60d55462010000900460ff161561169a5780600414158015611644575080600514155b8015611651575080600614155b801561165e575080600714155b61169a5760405162461bcd60e51b815260206004820152600d60248201526c676f7665726e6f72206c6f636b60981b6044820152606401610c84565b8060d660008888868181106116b1576116b161554b565b90506020020160208101906116c69190614e4b565b6001600160a01b031681526020810191909152604001600020558585838181106116f2576116f261554b565b90506020020160208101906117079190614e4b565b6001600160a01b03167fc456d076c1245c6b9759b3cdcb169e14e00a7739897e501844c8fe5fca6cb2608260405161174191815260200190565b60405180910390a2508061175481615561565b915050611511565b5050505050565b6066546001600160a01b0316611777613cc6565b6001600160a01b03161461179d5760405162461bcd60e51b8152600401610c8490615505565b60d5805462ff0000191662010000908117918290556040517fd9574ee4ccdf21db87aa2c1d1fee3248522d79c07c54bde4a9edeb0620bef71f926117ea92900460ff161515815260200190565b60405180910390a1565b6066546001600160a01b0316611808613cc6565b6001600160a01b03161461182e5760405162461bcd60e51b8152600401610c8490615505565b60d5805460ff191660019081179091556040519081527f5e1c9f68365556a24387c25fd0922af31039bcfc65d36caac57401d310948e59906020016117ea565b6000611878611f55565b611880612260565b61188a91906154ed565b905090565b6001600160a01b038116600090815260d6602052604081205460018114806118b75750806003145b806118c25750806005145b806118cd5750806007145b9392505050565b6000816040516020016118e791906151a9565b604051602081830303815290604052805190602001209050919050565b600061190e613d49565b63ffffffff85161580611954575060d05463ffffffff600160c01b820481169161194191600160a01b90910416426154ed565b61194b91906154ed565b8563ffffffff16115b61198a5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b6301312d008411156119d05760405162461bcd60e51b815260206004820152600f60248201526e0c4c2c2d88ec2e640e8de40d0d2ced608b1b6044820152606401610c84565b60d35460d054600091906001600160a01b0316639ab24eb06119f0613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5891906154be565b10611a6557506001611b4c565b60d1543414611ab65760405162461bcd60e51b815260206004820152601960248201527f4261616c20726571756972657320616e206f66666572696e67000000000000006044820152606401610c84565b6067546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b03576040519150601f19603f3d011682016040523d82523d6000602084013e611b08565b606091505b5050905080611b4a5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5b19081b9bdd081cd95b9960921b6044820152606401610c84565b505b6000611b8d89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b60d08054919250600160e01b90910463ffffffff1690601c611bae8361557c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050604051806101c0016040528060d0601c9054906101000a900463ffffffff1663ffffffff16815260200183611c03576000611c0d565b60da5463ffffffff165b63ffffffff16815260200183611c24576000611c26565b425b63ffffffff16815260200183611c3d576000611c57565b60d054611c5790600160a01b900463ffffffff16426155a0565b63ffffffff16815260200183611c6e576000611c9d565b60d05463ffffffff600160c01b8204811691611c9391600160a01b90910416426155a0565b611c9d91906155a0565b63ffffffff1681526020018863ffffffff168152602001878152602001600081526020016000815260200183611cd4576000611cdc565b611cdc61186e565b815260200183611ced576000611cf5565b611cf5611f55565b8152604080516080810182526000808252602082810182905282840182905260608301919091528301520183611d2c576000611d34565b611d34613cc6565b6001600160a01b03168152602090810183905260d054600160e01b900463ffffffff908116600090815260d983526040908190208451815494860151928601516060870151608088015160a089015193871667ffffffffffffffff1990981697909717600160201b958716959095029490941767ffffffffffffffff60401b1916600160401b9186169190910263ffffffff60601b191617600160601b938516939093029290921767ffffffffffffffff60801b1916600160801b9484169490940263ffffffff60a01b191693909317600160a01b919092160217815560c0820151600182015560e0820151600282015561010082015160038201556101208201516004808301919091556101408301516005830155610160830151611e5f91600684019190614bef565b506101808201516007820180546001600160a01b0319166001600160a01b039092169190911790556101a0909101516008909101558115611ebf5760d05460da8054600160e01b90920463ffffffff1663ffffffff199092169190911790555b8060d0601c9054906101000a900463ffffffff1663ffffffff167fb9956173924f9c1204bae41dd3737d7ed1161846d13183879cdc03c4b9f8d01960d060149054906101000a900463ffffffff168c8c8c8c89428e8e604051611f2a999897969594939291906155f1565b60405180910390a3505060d0546001609c55600160e01b900463ffffffff1690509695505050505050565b60d054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a91906154be565b6066546001600160a01b0316611fd7613cc6565b6001600160a01b03161480611ff25750611ff2610b94613cc6565b61200e5760405162461bcd60e51b8152600401610c8490615652565b82811461202d5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761208085858381811061204d5761204d61554b565b90506020020160208101906120629190614e4b565b8484848181106120745761207461554b565b90506020020135613daa565b8061208a81615561565b915050612030565b61209a614c81565b63ffffffff8216600090815260d9602052604080822081516080810192839052926006909101916004918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116120c8575094979650505050505050565b60db80546121109061567c565b80601f016020809104026020016040519081016040528092919081815260200182805461213c9061567c565b80156121895780601f1061215e57610100808354040283529160200191612189565b820191906000526020600020905b81548152906001019060200180831161216c57829003601f168201915b505050505081565b6066546001600160a01b03166121a5613cc6565b6001600160a01b031614806121c057506121c0610b94613cc6565b6121dc5760405162461bcd60e51b8152600401610c8490615652565b8281146121fb5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761224e85858381811061221b5761221b61554b565b90506020020160208101906122309190614e4b565b8484848181106122425761224261554b565b90506020020135613e15565b8061225881615561565b9150506121fe565b60cf54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b6122b2613d49565b6122c46122bd613cc6565b8383613e4e565b6111236001609c55565b6122d6613d49565b63ffffffff8316600090815260d96020526040902060078101546001600160a01b03166123305760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600561233b85613aea565b600781111561234c5761234c615471565b146123825760405162461bcd60e51b815260206004820152600660248201526521726561647960d01b6044820152606401610c84565b805460009061239d90600160201b900463ffffffff16613aea565b905060068160078111156123b3576123b3615471565b14806123d0575060038160078111156123ce576123ce615471565b145b806123ec575060078160078111156123ea576123ea615471565b145b806124085750600081600781111561240657612406615471565b145b6124455760405162461bcd60e51b815260206004820152600e60248201526d1c1c995d885c1c9bd8d95cdcd95960921b6044820152606401610c84565b816008015461248985858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b146124cb5760405162461bcd60e51b8152602060048201526012602482015271696e636f72726563742063616c6c6461746160701b6044820152606401610c84565b600182015415806124e0575081600101545a10155b61251d5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420656e6f7567682067617360901b6044820152606401610c84565b60068201805461ff0019166101001790558154600190600160a01b900463ffffffff161580159061255c5750825442600160a01b90910463ffffffff16105b15612565575060005b8080156125915750826005015460d25461257f91906156b1565b600284015461258f9060646156b1565b105b1561259a575060005b8080156125ca5750606460d45484600401546125b691906156b1565b6125c091906156d0565b6125c861186e565b105b156125d3575060005b801561264c5760068301805462ff0000191662010000179055604080516020601f870181900481028201810190925285815260009161262d919088908890819084018382808284376000920191909152506140a292505050565b90508061264a5760068401805463ff000000191663010000001790555b505b60068301546040805160ff62010000840481161515825263010000009093049092161515602083015263ffffffff8816917fb4571f7e4e2c2b6e6185e47ab5caa5fe34087299bd49fbae945a4583101ee3f0910160405180910390a25050506126b56001609c55565b505050565b6126c2613cd0565b6126cc60006140cb565b565b6126d6613cd0565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b6066546001600160a01b031661273c613cc6565b6001600160a01b031614806127575750612757610b94613cc6565b6127735760405162461bcd60e51b8152600401610c8490615652565b8281146127925760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c576127e58585838181106127b2576127b261554b565b90506020020160208101906127c79190614e4b565b8484848181106127d9576127d961554b565b9050602002013561411d565b806127ef81615561565b915050612795565b600054610100900460ff16158080156128175750600054600160ff909116105b806128315750303b158015612831575060005460ff166001145b6128945760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff1916600117905580156128b7576000805461ff0019166101001790555b6128bf613d49565b600080600080600080878060200190518101906128dc9190615742565b95509550955095509550955060006001600160a01b0316846001600160a01b03161415801561291357506001600160a01b03831615155b61294d5760405162461bcd60e51b815260206004820152600b60248201526a0c081859191c881d5cd95960aa1b6044820152606401610c84565b6040518060600160405280602d8152602001615b8d602d9139805161297a9160db91602090910190614c9f565b50612983614156565b61298b614185565b6129ca60405180604001604052806004815260200163566f746560e01b815250604051806040016040528060018152602001600d60fa1b8152506141b4565b6129d38361386f565b606680546001600160a01b0385166001600160a01b03199182168117909255606780549091169091179055612a07826141e5565b60cf80546001600160a01b03199081166001600160a01b038981169190911790925560d0805490911687831617905560da8054640100000000600160c01b031916600160201b87841681029190911791829055612a6b929104166000836001614207565b612aac5760405162461bcd60e51b8152602060048201526012602482015271063616c6c206661696c7572652073657475760741b6044820152606401610c84565b60cf5460408051635c975abb60e01b815290517f916f812584e0b001e8c6ab604fa549cc16c9d0b2f60b17aa0b4ff5eefe3e7725926001600160a01b031691635c975abb9160048083019260209291908290030181865afa158015612b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3991906154a1565b60d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb091906154a1565b60d05460d15460d25460d35460d454604080516306fdde0360e01b8152905163ffffffff600160c01b8804811697600160a01b810490911696959493926001600160a01b03909116916306fdde03916004808201926000929091908290030181865afa158015612c24573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c4c91908101906157df565b60d060009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015612c9f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612cc791908101906157df565b612ccf611f55565b612cd7612260565b604051612cef9c9b9a99989796959493929190615827565b60405180910390a1505050505050612d076001609c55565b8015611123576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ff4565b6066546001600160a01b0316612d5d613cc6565b6001600160a01b031614612d835760405162461bcd60e51b8152600401610c8490615505565b60d5805461ff001916610100908117918290556040517fb496b9628e839102454d8b483ba451c4be96675009b637273a00e4ab6a59db72926117ea92900460ff161515815260200190565b6066546001600160a01b0316612de2613cc6565b6001600160a01b03161480612dfd5750612dfd610b94613cc6565b612e195760405162461bcd60e51b8152600401610c8490615652565b828114612e385760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57612e8b858583818110612e5857612e5861554b565b9050602002016020810190612e6d9190614e4b565b848484818110612e7f57612e7f61554b565b9050602002013561421f565b80612e9581615561565b915050612e3b565b6066546001600160a01b0316612eb1613cc6565b6001600160a01b031614612ed75760405162461bcd60e51b8152600401610c8490615505565b6000846001600160a01b0316848484604051612ef49291906158ad565b60006040518083038185875af1925050503d8060008114612f31576040519150601f19603f3d011682016040523d82523d6000602084013e612f36565b606091505b505090508061175c5760405162461bcd60e51b815260206004820152601460248201527363616c6c206661696c757265206578656375746560601b6044820152606401610c84565b612f86613d49565b86421115612fd65760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610c84565b6001600160a01b038816600090815260d8602052604090205486146130265760405162461bcd60e51b8152602060048201526006602482015265216e6f6e636560d01b6044820152606401610c84565b60007f8698fbcc7273f96a670eb203cb707d8ec171123f24eaf075b1e754b71119e59e60d060009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801561309c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130c491908101906157df565b6040516020016130d491906158bd565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905263ffffffff871660c082015285151560e082015261010001604051602081830303815290604052805190602001209050600061315182614258565b90506000613161828787876142a6565b90508a6001600160a01b0316816001600160a01b0316146131b85760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606401610c84565b6001600160a01b0381166131f85760405162461bcd60e51b815260206004820152600760248201526610b9b4b3b732b960c91b6044820152606401610c84565b6001600160a01b038b16600090815260d8602052604081208054600192906132219084906154ed565b909155506132329050818989613e4e565b50505061323f6001609c55565b5050505050505050565b60608060005b84518110156132cc578160008560008885815181106132705761327061554b565b60200260200101515189868151811061328b5761328b61554b565b60200260200101516040516020016132a8969594939291906158d9565b604051602081830303815290604052915080806132c490615561565b91505061324f565b50806040516024016132de91906151a9565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b6066546001600160a01b0316613324613cc6565b6001600160a01b0316148061333f575061333f610b14613cc6565b61337f5760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b613388816141e5565b6040516001600160a01b038216907f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff90600090a250565b6133c7613cd0565b6001600160a01b0381161561346d576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344591906154a1565b61346d576040516358b7533f60e11b81526001600160a01b0382166004820152602401610c84565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6001600160a01b038116600090815260d6602052604081205460048114806134e95750806005145b806118c2575080600614806118cd575060071492915050565b61350a613d49565b60015b818110156135c7578282613522600184615943565b8181106135315761353161554b565b90506020020160208101906135469190614e4b565b6001600160a01b03168383838181106135615761356161554b565b90506020020160208101906135769190614e4b565b6001600160a01b0316116135b55760405162461bcd60e51b815260206004820152600660248201526510b7b93232b960d11b6044820152606401610c84565b806135bf81615561565b91505061350d565b506136078585858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506142c492505050565b61175c6001609c55565b6066546001600160a01b0316613625613cc6565b6001600160a01b031614806136405750613640610b14613cc6565b6136805760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b6000806000806000808680602001905181019061369d919061595a565b949a5092985090965094509250905060648111156136ea5760405162461bcd60e51b815260206004820152600a6024820152696261642071756f72756d60b01b6044820152606401610c84565b606481111561372e5760405162461bcd60e51b815260206004820152601060248201526f3130b21036b4b72932ba32b73a34b7b760811b6044820152606401610c84565b600060d35411801561374a575060d0546001600160a01b031615155b1561379f57613757611f55565b82111561379f5760405162461bcd60e51b815260206004820152601660248201527573706f6e736f72203e20736861726573537570706c7960501b6044820152606401610c84565b63ffffffff8616156137ca5760d0805463ffffffff60a01b1916600160a01b63ffffffff8916021790555b63ffffffff8516156137f55760d0805463ffffffff60c01b1916600160c01b63ffffffff8816021790555b60d184905560d283905560d382905560d48190556040805163ffffffff808916825287166020820152908101859052606081018490526080810183905260a081018290527fc10758ccd7d1dd3330e7bbe13a1a1d6bbb414967932376ee24989bad95edcdc19060c00160405180910390a150505050505050565b613877613cd0565b6001600160a01b0381166138dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b6114b2816140cb565b6001600160a01b038116600090815260d6602052604081205460028114806134e9575080600314806118c2575080600614806118cd575060071492915050565b61392d613d49565b63ffffffff8116600090815260d960205260409020600261394d83613aea565b600781111561395e5761395e615471565b146139955760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60078101546001600160a01b03166139ab613cc6565b6001600160a01b03161480613a53575060d35460d05460078301546001600160a01b0391821691633a46b1a891166139e4600142615943565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015613a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5191906154be565b105b80613a645750613a64610b14613cc6565b613a9f5760405162461bcd60e51b815260206004820152600c60248201526b2163616e63656c6c61626c6560a01b6044820152606401610c84565b60068101805460ff1916600117905560405163ffffffff8316907f8896f24cff41b54acf76c2560861f33cd20fd76c4df0b68a3515c354e4b6c81a90600090a2506114b26001609c55565b63ffffffff818116600090815260d96020908152604080832081516101c08101835281548087168252600160201b8104871694820194909452600160401b8404861681840152600160601b840486166060820152600160801b84048616608080830191909152600160a01b90940490951660a0860152600181015460c0860152600281015460e08601526003810154610100860152600480820154610120870152600582015461014087015282519384019283905293948594909391926101608501929160068501918288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613bb75750505092845250505060078201546001600160a01b03166020820152600890910154604090910152805190915063ffffffff16613c255750600092915050565b6101608101515115613c3a5750600392915050565b604081015163ffffffff16613c525750600192915050565b806060015163ffffffff164211613c6c5750600292915050565b806080015163ffffffff164211613c865750600492915050565b8060e0015181610100015110613c9f5750600792915050565b6101608101516020015115613cb75750600692915050565b50600592915050565b50919050565b600061188a614540565b613cd8613cc6565b6001600160a01b0316613cf36033546001600160a01b031690565b6001600160a01b0316146126cc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b6002609c541415613d9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c84565b6002609c55565b6001609c55565b60cf546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015b600060405180830381600087803b158015613df957600080fd5b505af1158015613e0d573d6000803e3d6000fd5b505050505050565b60cf54604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b63ffffffff8216600090815260d9602052604090206002613e6e84613aea565b6007811115613e7f57613e7f615471565b14613eb65760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60d0548154604051630748d63560e31b81526001600160a01b038781166004830152600160401b90920463ffffffff1660248201526000929190911690633a46b1a890604401602060405180830381865afa158015613f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3d91906154be565b905060008111613f795760405162461bcd60e51b815260206004820152600760248201526610b6b2b6b132b960c91b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff8816845290915290205460ff1615613fdb5760405162461bcd60e51b81526020600482015260056024820152641d9bdd195960da1b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff881684529091528120805460ff1916600117905561401761186e565b9050826004015481111561402d57600483018190555b8315614042576002830180548301905561404d565b600383018054830190555b8315158563ffffffff16876001600160a01b03167f786755545a7e27c12c90cc7f0934514d03fdacfe3684a340b8c4100531e7ecd58560405161409291815260200190565b60405180910390a4505050505050565b60da546000906140c590600160201b90046001600160a01b031682846001614207565b92915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60d054604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b600054610100900460ff1661417d5760405162461bcd60e51b8152600401610c84906159b8565b6126cc614574565b600054610100900460ff166141ac5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145ab565b600054610100900460ff166141db5760405162461bcd60e51b8152600401610c84906159b8565b61112382826145d2565b60ce80546001600160a01b0319166001600160a01b0392909216919091179055565b600061421585858585614613565b5095945050505050565b60d0546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401613ddf565b60006140c5614265614812565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006142b78787878761488d565b9150915061421581614951565b60006142ce61186e565b905082156142e7576142e76142e1613cc6565b84613e15565b83156142fe576142fe6142f8613cc6565b8561411d565b60005b82518110156144ec57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031684838151811061433c5761433c61554b565b60200260200101516001600160a01b0316141561436657506067546001600160a01b031631614434565b600084838151811061437a5761437a61554b565b602090810291909101810151606754604080516001600160a01b03928316602480830191909152825180830390910181526044909101825293840180516001600160e01b03166370a0823160e01b179052519116916143d8916158bd565b600060405180830381855afa9150503d8060008114614413576040519150601f19603f3d011682016040523d82523d6000602084013e614418565b606091505b509150508080602001905181019061443091906154be565b9150505b6000838261444289896154ed565b61444c91906156b1565b61445691906156d0565b905080156144d75773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031685848151811061448e5761448e61554b565b60200260200101516001600160a01b0316146144cd576144c88584815181106144b9576144b961554b565b60200260200101518983614a9f565b6144d7565b6144d78882614b6e565b505080806144e490615561565b915050614301565b5083836144f7613cc6565b6001600160a01b03167fa21c268847f2b8adac3751ed0683330abe9fdd6cc4a7a8fc6787633d4126e0d48886604051614531929190615a03565b60405180910390a45050505050565b60006014361080159061455d575060ce546001600160a01b031633145b1561456f575060131936013560601c90565b503390565b600054610100900460ff1661459b5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145a6613cc6565b6140cb565b600054610100900460ff16613da35760405162461bcd60e51b8152600401610c84906159b8565b600054610100900460ff166145f95760405162461bcd60e51b8152600401610c84906159b8565b815160209283012081519190920120606891909155606955565b6065546000906060906001600160a01b0316801561478557604051633af85da960e11b81526001600160a01b038216906375f0bb529061466a908a908a908a908a9060009081908190819081903390600401615a73565b600060405180830381600087803b15801561468457600080fd5b505af1158015614698573d6000803e3d6000fd5b5050606754604051635229073f60e01b81526001600160a01b039091169250635229073f91506146d2908a908a908a908a90600401615afd565b6000604051808303816000875af11580156146f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526147199190810190615b3c565b604051631264e26d60e31b815260006004820152821515602482015291945092506001600160a01b03821690639327136890604401600060405180830381600087803b15801561476857600080fd5b505af115801561477c573d6000803e3d6000fd5b50505050614808565b606754604051635229073f60e01b81526001600160a01b0390911690635229073f906147bb908a908a908a908a90600401615afd565b6000604051808303816000875af11580156147da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148029190810190615b3c565b90935091505b5094509492505050565b600061188a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61484160685490565b6069546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614948565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614918573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661494157600060019250925050614948565b9150600090505b94509492505050565b600081600481111561496557614965615471565b141561496e5750565b600181600481111561498257614982615471565b14156149d05760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c84565b60028160048111156149e4576149e4615471565b1415614a325760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b6003816004811115614a4657614a46615471565b14156114b25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b600080614b0785600063a9059cbb8787604051602401614ad49291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506000614bd2565b91509150818015614b30575080511580614b30575080806020019051810190614b3091906154a1565b61175c5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610c84565b6000614b8c8383604051806020016040528060008152506000614bd2565b509050806126b55760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606401610c84565b60006060614be286868686614613565b9097909650945050505050565b600183019183908215614c715791602002820160005b83821115614c4257835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c05565b8015614c6f5782816101000a81549060ff0219169055600101602081600001049283019260010302614c42565b505b50614c7d929150614d13565b5090565b60405180608001604052806004906020820280368337509192915050565b828054614cab9061567c565b90600052602060002090601f016020900481019282614ccd5760008555614c71565b82601f10614ce657805160ff1916838001178555614c71565b82800160010185558215614c71579182015b82811115614c71578251825591602001919060010190614cf8565b5b80821115614c7d5760008155600101614d14565b600060208284031215614d3a57600080fd5b5035919050565b60006101a08201905063ffffffff8f16825263ffffffff8e16602083015263ffffffff8d16604083015263ffffffff8c16606083015263ffffffff8b16608083015263ffffffff8a1660a08301528860c08301528760e0830152866101008301528561012083015284610140830152614dc66101608301856001600160a01b03169052565b826101808301529e9d5050505050505050505050505050565b80151581146114b257600080fd5b60008060408385031215614e0057600080fd5b8235614e0b81614ddf565b91506020830135614e1b81614ddf565b809150509250929050565b6001600160a01b03811681146114b257600080fd5b8035614e4681614e26565b919050565b600060208284031215614e5d57600080fd5b81356118cd81614e26565b63ffffffff811681146114b257600080fd5b600060208284031215614e8c57600080fd5b81356118cd81614e68565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008060008060408587031215614ef857600080fd5b84356001600160401b0380821115614f0f57600080fd5b614f1b88838901614e97565b90965094506020870135915080821115614f3457600080fd5b50614f4187828801614e97565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f8b57614f8b614f4d565b604052919050565b60006001600160401b03821115614fac57614fac614f4d565b50601f01601f191660200190565b600082601f830112614fcb57600080fd5b8135614fde614fd982614f93565b614f63565b818152846020838601011115614ff357600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561502257600080fd5b81356001600160401b0381111561503857600080fd5b61504484828501614fba565b949350505050565b60008083601f84011261505e57600080fd5b5081356001600160401b0381111561507557600080fd5b602083019150836020828501011115614edb57600080fd5b600080600080600080608087890312156150a657600080fd5b86356001600160401b03808211156150bd57600080fd5b6150c98a838b0161504c565b9098509650602089013591506150de82614e68565b90945060408801359350606088013590808211156150fb57600080fd5b5061510889828a0161504c565b979a9699509497509295939492505050565b60808101818360005b60048110156151445781511515835260209283019290910190600101615123565b50505092915050565b60005b83811015615168578181015183820152602001615150565b83811115615177576000848401525b50505050565b6000815180845261519581602086016020860161514d565b601f01601f19169290920160200192915050565b6020815260006118cd602083018461517d565b600080604083850312156151cf57600080fd5b8235614e0b81614e68565b6000806000604084860312156151ef57600080fd5b83356151fa81614e68565b925060208401356001600160401b0381111561521557600080fd5b6152218682870161504c565b9497909650939450505050565b6000806000806060858703121561524457600080fd5b843561524f81614e26565b93506020850135925060408501356001600160401b0381111561527157600080fd5b614f418782880161504c565b600080600080600080600080610100898b03121561529a57600080fd5b88356152a581614e26565b9750602089013596506040890135955060608901356152c381614e68565b945060808901356152d381614ddf565b935060a089013560ff811681146152e957600080fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121561531957600080fd5b823561532481614e26565b91506020830135614e1b81614e68565b6000806040838503121561534757600080fd5b82356001600160401b038082111561535e57600080fd5b818501915085601f83011261537257600080fd5b813560208282111561538657615386614f4d565b8160051b615395828201614f63565b928352848101820192828101908a8511156153af57600080fd5b83870192505b848310156153eb578235868111156153cd5760008081fd5b6153db8c86838b0101614fba565b83525091830191908301906153b5565b97506153fb915050878201614e3b565b9450505050509250929050565b60008060008060006080868803121561542057600080fd5b853561542b81614e26565b9450602086013593506040860135925060608601356001600160401b0381111561545457600080fd5b61546088828901614e97565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b602081016008831061549b5761549b615471565b91905290565b6000602082840312156154b357600080fd5b81516118cd81614ddf565b6000602082840312156154d057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615500576155006154d7565b500190565b602080825260059082015264085898585b60da1b604082015260600190565b6020808252600d908201526c2161727261792070617269747960981b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615575576155756154d7565b5060010190565b600063ffffffff80831681811415615596576155966154d7565b6001019392505050565b600063ffffffff8083168185168083038211156155bf576155bf6154d7565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808c16835260e0602084015261561260e084018b8d6155c8565b818a16604085015288606085015287151560808501528660a085015283810360c08501526156418186886155c8565b9d9c50505050505050505050505050565b60208082526010908201526f10b130b0b610131010b6b0b730b3b2b960811b604082015260600190565b600181811c9082168061569057607f821691505b60208210811415613cc057634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156156cb576156cb6154d7565b500290565b6000826156ed57634e487b7160e01b600052601260045260246000fd5b500490565b6000615700614fd984614f93565b905082815283838301111561571457600080fd5b6118cd83602083018461514d565b600082601f83011261573357600080fd5b6118cd838351602085016156f2565b60008060008060008060c0878903121561575b57600080fd5b865161576681614e26565b602088015190965061577781614e26565b604088015190955061578881614e26565b606088015190945061579981614e26565b60808801519093506157aa81614e26565b60a08801519092506001600160401b038111156157c657600080fd5b6157d289828a01615722565b9150509295509295509295565b6000602082840312156157f157600080fd5b81516001600160401b0381111561580757600080fd5b8201601f8101841361581857600080fd5b615044848251602084016156f2565b60006101808e151583528d1515602084015263ffffffff808e166040850152808d166060850152508a60808401528960a08401528860c08401528760e08401528061010084015261587a8184018861517d565b905082810361012084015261588f818761517d565b610140840195909552505061016001529a9950505050505050505050565b8183823760009101908152919050565b600082516158cf81846020870161514d565b9190910192915050565b600087516158eb818460208c0161514d565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b166001820152856015820152846035820152835161593381605584016020880161514d565b0160550198975050505050505050565b600082821015615955576159556154d7565b500390565b60008060008060008060c0878903121561597357600080fd5b865161597e81614e68565b602088015190965061598f81614e68565b6040880151606089015160808a015160a0909a0151989b929a5090989097909650945092505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b81811015615a51578551851683529483019491830191600101615a33565b509098975050505050505050565b60028110615a6f57615a6f615471565b9052565b6001600160a01b038b81168252602082018b905261016060408301819052600091615aa08483018d61517d565b9150615aaf606085018c615a5f565b608084019990995260a08301979097525060c081019490945291851660e084015284166101008301528183036101208301526000835290921661014090920191909152602001949350505050565b60018060a01b0385168152836020820152608060408201526000615b24608083018561517d565b9050615b336060830184615a5f565b95945050505050565b60008060408385031215615b4f57600080fd5b8251615b5a81614ddf565b60208401519092506001600160401b03811115615b7657600080fd5b615b8285828601615722565b915050925092905056fe322e322e352b6f70656e67736e2e70617961626c65776974686261616c2e6972656c6179726563697069656e74a2646970667358221220e7f7a8af70f47c4c0a43ae70fdb50ef5f9643adc80e4e50e8e0c3ddc18ff5f7f64736f6c634300080a0033", + "deployedBytecode": "0x6080604052600436106103a25760003560e01c80638009ba1f116101e7578063cf043df31161010d578063ed0cdf15116100a0578063f460124d1161006f578063f460124d14610b99578063f81cbd2614610bb9578063fab514c014610bcf578063fe47668614610bef57600080fd5b8063ed0cdf1514610b19578063ee4d88ed14610b39578063f2fde38b14610b59578063f3ae241514610b7957600080fd5b8063da35c664116100dc578063da35c66414610a95578063da74222814610ab9578063e19a9dd914610ad9578063e43581b814610af957600080fd5b8063cf043df3146109fa578063d33defc714610a1a578063d4b8399214610a55578063d61f27ae14610a7557600080fd5b8063a4f9edbf11610185578063b634e4e011610154578063b634e4e014610979578063c00d077514610996578063c4e931f6146109bd578063c9106389146109dc57600080fd5b8063a4f9edbf14610904578063acca30a214610924578063b1e3f40c14610939578063b3c98bbb1461095957600080fd5b806398a527cc116101c157806398a527cc1461088a5780639a2f747f146108aa578063a06db7dc146108c0578063a26ec96e146108e457600080fd5b80638009ba1f1461083657806383bf8459146108565780638da5cb5b1461086c57600080fd5b80634526d846116102cc5780635ec286961161026a578063715018a611610239578063715018a6146107c3578063776d1a01146107d85780637ceab3b1146107f85780637da0a8771461081857600080fd5b80635ec286961461074e578063635e99aa1461076e57806367f61f0714610783578063706a6e93146107a357600080fd5b806352ba1da7116102a657806352ba1da7146106a4578063572b6c05146106d15780635aef7de6146107005780635cfd6f7e1461073857600080fd5b80634526d846146106355780634630affc14610655578063486ff0cd1461068257600080fd5b8063136d731a11610344578063258bfe2f11610313578063258bfe2f146105c05780633232444c146105e05780633a82ffc81461060d5780633a98ef391461062057600080fd5b8063136d731a1461055357806316fd265d1461056857806318160ddd1461057d57806324d7806c146105a057600080fd5b8063056b0dcd11610380578063056b0dcd146104d1578063086cfca8146104f35780630a796e19146105135780630f656a211461053357600080fd5b8063013cf08b146103a7578063027cdf451461046e57806302a251a314610498575b600080fd5b3480156103b357600080fd5b5061044c6103c2366004614d28565b60d9602052600090815260409020805460018201546002830154600384015460048501546005860154600787015460089097015463ffffffff80881698600160201b8904821698600160401b8104831698600160601b8204841698600160801b8304851698600160a01b90930490941696909593949193909290916001600160a01b03909116908d565b6040516104659d9c9b9a99989796959493929190614d41565b60405180910390f35b34801561047a57600080fd5b5060d5546104889060ff1681565b6040519015158152602001610465565b3480156104a457600080fd5b5060d0546104bc90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610465565b3480156104dd57600080fd5b506104f16104ec366004614ded565b610c1c565b005b3480156104ff57600080fd5b506104f161050e366004614e4b565b611127565b34801561051f57600080fd5b506104f161052e366004614e7a565b611181565b34801561053f57600080fd5b506104f161054e366004614ee2565b6114b5565b34801561055f57600080fd5b506104f1611763565b34801561057457600080fd5b506104f16117f4565b34801561058957600080fd5b5061059261186e565b604051908152602001610465565b3480156105ac57600080fd5b506104886105bb366004614e4b565b61188f565b3480156105cc57600080fd5b506105926105db366004615010565b6118d4565b3480156105ec57600080fd5b506105926105fb366004614e4b565b60d66020526000908152604090205481565b61059261061b36600461508d565b611904565b34801561062c57600080fd5b50610592611f55565b34801561064157600080fd5b506104f1610650366004614ee2565b611fc3565b34801561066157600080fd5b50610675610670366004614e7a565b612092565b604051610465919061511a565b34801561068e57600080fd5b50610697612103565b60405161046591906151a9565b3480156106b057600080fd5b506105926106bf366004614e4b565b60d86020526000908152604090205481565b3480156106dd57600080fd5b506104886106ec366004614e4b565b60ce546001600160a01b0391821691161490565b34801561070c57600080fd5b50606654610720906001600160a01b031681565b6040516001600160a01b039091168152602001610465565b34801561074457600080fd5b5061059260d35481565b34801561075a57600080fd5b506104f1610769366004614ee2565b612191565b34801561077a57600080fd5b50610592612260565b34801561078f57600080fd5b506104f161079e3660046151bc565b6122aa565b3480156107af57600080fd5b506104f16107be3660046151da565b6122ce565b3480156107cf57600080fd5b506104f16126ba565b3480156107e457600080fd5b506104f16107f3366004614e4b565b6126ce565b34801561080457600080fd5b50606554610720906001600160a01b031681565b34801561082457600080fd5b5060ce546001600160a01b0316610720565b34801561084257600080fd5b5060d054610720906001600160a01b031681565b34801561086257600080fd5b5061059260d45481565b34801561087857600080fd5b506033546001600160a01b0316610720565b34801561089657600080fd5b506104f16108a5366004614ee2565b612728565b3480156108b657600080fd5b5061059260d15481565b3480156108cc57600080fd5b5060d0546104bc90600160c01b900463ffffffff1681565b3480156108f057600080fd5b5060d5546104889062010000900460ff1681565b34801561091057600080fd5b506104f161091f366004615010565b6127f7565b34801561093057600080fd5b506104f1612d49565b34801561094557600080fd5b506104f1610954366004614ee2565b612dce565b34801561096557600080fd5b506104f161097436600461522e565b612e9d565b34801561098557600080fd5b5060da546104bc9063ffffffff1681565b3480156109a257600080fd5b5060da5461072090600160201b90046001600160a01b031681565b3480156109c957600080fd5b5060d55461048890610100900460ff1681565b3480156109e857600080fd5b506065546001600160a01b0316610720565b348015610a0657600080fd5b506104f1610a1536600461527d565b612f7e565b348015610a2657600080fd5b50610488610a35366004615306565b60d760209081526000928352604080842090915290825290205460ff1681565b348015610a6157600080fd5b50606754610720906001600160a01b031681565b348015610a8157600080fd5b50610697610a90366004615334565b613249565b348015610aa157600080fd5b5060d0546104bc90600160e01b900463ffffffff1681565b348015610ac557600080fd5b506104f1610ad4366004614e4b565b613310565b348015610ae557600080fd5b506104f1610af4366004614e4b565b6133bf565b348015610b0557600080fd5b50610488610b14366004614e4b565b6134c1565b348015610b2557600080fd5b506104f1610b34366004615408565b613502565b348015610b4557600080fd5b506104f1610b54366004615010565b613611565b348015610b6557600080fd5b506104f1610b74366004614e4b565b61386f565b348015610b8557600080fd5b50610488610b94366004614e4b565b6138e5565b348015610ba557600080fd5b5060cf54610720906001600160a01b031681565b348015610bc557600080fd5b5061059260d25481565b348015610bdb57600080fd5b506104f1610bea366004614e7a565b613925565b348015610bfb57600080fd5b50610c0f610c0a366004614e7a565b613aea565b6040516104659190615487565b6066546001600160a01b0316610c30613cc6565b6001600160a01b03161480610c4b5750610c4b6105bb613cc6565b610c8d5760405162461bcd60e51b815260206004820152600e60248201526d10b130b0b610131010b0b236b4b760911b60448201526064015b60405180910390fd5b818015610d0e575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c91906154a1565b155b15610db55760d060009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d6357600080fd5b505af1158015610d77573d6000803e3d6000fd5b5050604051600181527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a1610ed8565b81158015610e35575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3591906154a1565b15610ed85760d060009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b5050604051600081527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a15b808015610f59575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5791906154a1565b155b156110005760cf60009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fae57600080fd5b505af1158015610fc2573d6000803e3d6000fd5b5050604051600181527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb925060200190505b60405180910390a15050565b80158015611080575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108091906154a1565b156111235760cf60009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b5050604051600081527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb9250602001905060405180910390a15b5050565b61112f613cd0565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b611189613d49565b63ffffffff8116600090815260d96020526040902060d35460d0546001600160a01b0316639ab24eb06111ba613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122291906154be565b101561125b5760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600161126683613aea565b600781111561127757611277615471565b146112b15760405162461bcd60e51b815260206004820152600a602482015269085cdd589b5a5d1d195960b21b6044820152606401610c84565b8054600160a01b900463ffffffff161580611307575060d05463ffffffff600160c01b82048116916112ec91600160a01b90910416426154ed565b6112f691906154ed565b8154600160a01b900463ffffffff16115b61133d5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b805463ffffffff42818116600160401b026bffffffff00000000000000001984168117855560d08054600160a01b90819004851684018516600160601b0263ffffffff60601b1990931667ffffffffffffffff60401b19909616959095179190911780865590549384048316909101600160c01b9093048216929092018116600160801b0263ffffffff60801b1983168117845560da54600160201b92169190910267ffffffff000000001990911673ffffffff0000000000000000ffffffff000000001990921691909117178155611414613cc6565b6007820180546001600160a01b0319166001600160a01b039290921691909117905561143e61186e565b600482015561144b611f55565b600582015560da805463ffffffff191663ffffffff84169081179091554290611472613cc6565b6001600160a01b03167fd45ad122361f16d6f50d7c4a73638f20ee48eff6186af15224e2a4a1f6d5017160405160405180910390a4506114b26001609c55565b50565b6066546001600160a01b03166114c9613cc6565b6001600160a01b0316146114ef5760405162461bcd60e51b8152600401610c8490615505565b82811461150e5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57600083838381811061152d5761152d61554b565b60d5546020909102929092013592505060ff16156115aa5780600114158015611557575080600314155b8015611564575080600514155b8015611571575080600714155b6115aa5760405162461bcd60e51b815260206004820152600a60248201526961646d696e206c6f636b60b01b6044820152606401610c84565b60d554610100900460ff161561162157806002141580156115cc575080600314155b80156115d9575080600614155b80156115e6575080600714155b6116215760405162461bcd60e51b815260206004820152600c60248201526b6d616e61676572206c6f636b60a01b6044820152606401610c84565b60d55462010000900460ff161561169a5780600414158015611644575080600514155b8015611651575080600614155b801561165e575080600714155b61169a5760405162461bcd60e51b815260206004820152600d60248201526c676f7665726e6f72206c6f636b60981b6044820152606401610c84565b8060d660008888868181106116b1576116b161554b565b90506020020160208101906116c69190614e4b565b6001600160a01b031681526020810191909152604001600020558585838181106116f2576116f261554b565b90506020020160208101906117079190614e4b565b6001600160a01b03167fc456d076c1245c6b9759b3cdcb169e14e00a7739897e501844c8fe5fca6cb2608260405161174191815260200190565b60405180910390a2508061175481615561565b915050611511565b5050505050565b6066546001600160a01b0316611777613cc6565b6001600160a01b03161461179d5760405162461bcd60e51b8152600401610c8490615505565b60d5805462ff0000191662010000908117918290556040517fd9574ee4ccdf21db87aa2c1d1fee3248522d79c07c54bde4a9edeb0620bef71f926117ea92900460ff161515815260200190565b60405180910390a1565b6066546001600160a01b0316611808613cc6565b6001600160a01b03161461182e5760405162461bcd60e51b8152600401610c8490615505565b60d5805460ff191660019081179091556040519081527f5e1c9f68365556a24387c25fd0922af31039bcfc65d36caac57401d310948e59906020016117ea565b6000611878611f55565b611880612260565b61188a91906154ed565b905090565b6001600160a01b038116600090815260d6602052604081205460018114806118b75750806003145b806118c25750806005145b806118cd5750806007145b9392505050565b6000816040516020016118e791906151a9565b604051602081830303815290604052805190602001209050919050565b600061190e613d49565b63ffffffff85161580611954575060d05463ffffffff600160c01b820481169161194191600160a01b90910416426154ed565b61194b91906154ed565b8563ffffffff16115b61198a5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b6301312d008411156119d05760405162461bcd60e51b815260206004820152600f60248201526e0c4c2c2d88ec2e640e8de40d0d2ced608b1b6044820152606401610c84565b60d35460d054600091906001600160a01b0316639ab24eb06119f0613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5891906154be565b10611a6557506001611b4c565b60d1543414611ab65760405162461bcd60e51b815260206004820152601960248201527f4261616c20726571756972657320616e206f66666572696e67000000000000006044820152606401610c84565b6067546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b03576040519150601f19603f3d011682016040523d82523d6000602084013e611b08565b606091505b5050905080611b4a5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5b19081b9bdd081cd95b9960921b6044820152606401610c84565b505b6000611b8d89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b60d08054919250600160e01b90910463ffffffff1690601c611bae8361557c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050604051806101c0016040528060d0601c9054906101000a900463ffffffff1663ffffffff16815260200183611c03576000611c0d565b60da5463ffffffff165b63ffffffff16815260200183611c24576000611c26565b425b63ffffffff16815260200183611c3d576000611c57565b60d054611c5790600160a01b900463ffffffff16426155a0565b63ffffffff16815260200183611c6e576000611c9d565b60d05463ffffffff600160c01b8204811691611c9391600160a01b90910416426155a0565b611c9d91906155a0565b63ffffffff1681526020018863ffffffff168152602001878152602001600081526020016000815260200183611cd4576000611cdc565b611cdc61186e565b815260200183611ced576000611cf5565b611cf5611f55565b8152604080516080810182526000808252602082810182905282840182905260608301919091528301520183611d2c576000611d34565b611d34613cc6565b6001600160a01b03168152602090810183905260d054600160e01b900463ffffffff908116600090815260d983526040908190208451815494860151928601516060870151608088015160a089015193871667ffffffffffffffff1990981697909717600160201b958716959095029490941767ffffffffffffffff60401b1916600160401b9186169190910263ffffffff60601b191617600160601b938516939093029290921767ffffffffffffffff60801b1916600160801b9484169490940263ffffffff60a01b191693909317600160a01b919092160217815560c0820151600182015560e0820151600282015561010082015160038201556101208201516004808301919091556101408301516005830155610160830151611e5f91600684019190614bef565b506101808201516007820180546001600160a01b0319166001600160a01b039092169190911790556101a0909101516008909101558115611ebf5760d05460da8054600160e01b90920463ffffffff1663ffffffff199092169190911790555b8060d0601c9054906101000a900463ffffffff1663ffffffff167fb9956173924f9c1204bae41dd3737d7ed1161846d13183879cdc03c4b9f8d01960d060149054906101000a900463ffffffff168c8c8c8c89428e8e604051611f2a999897969594939291906155f1565b60405180910390a3505060d0546001609c55600160e01b900463ffffffff1690509695505050505050565b60d054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a91906154be565b6066546001600160a01b0316611fd7613cc6565b6001600160a01b03161480611ff25750611ff2610b94613cc6565b61200e5760405162461bcd60e51b8152600401610c8490615652565b82811461202d5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761208085858381811061204d5761204d61554b565b90506020020160208101906120629190614e4b565b8484848181106120745761207461554b565b90506020020135613daa565b8061208a81615561565b915050612030565b61209a614c81565b63ffffffff8216600090815260d9602052604080822081516080810192839052926006909101916004918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116120c8575094979650505050505050565b60db80546121109061567c565b80601f016020809104026020016040519081016040528092919081815260200182805461213c9061567c565b80156121895780601f1061215e57610100808354040283529160200191612189565b820191906000526020600020905b81548152906001019060200180831161216c57829003601f168201915b505050505081565b6066546001600160a01b03166121a5613cc6565b6001600160a01b031614806121c057506121c0610b94613cc6565b6121dc5760405162461bcd60e51b8152600401610c8490615652565b8281146121fb5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761224e85858381811061221b5761221b61554b565b90506020020160208101906122309190614e4b565b8484848181106122425761224261554b565b90506020020135613e15565b8061225881615561565b9150506121fe565b60cf54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b6122b2613d49565b6122c46122bd613cc6565b8383613e4e565b6111236001609c55565b6122d6613d49565b63ffffffff8316600090815260d96020526040902060078101546001600160a01b03166123305760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600561233b85613aea565b600781111561234c5761234c615471565b146123825760405162461bcd60e51b815260206004820152600660248201526521726561647960d01b6044820152606401610c84565b805460009061239d90600160201b900463ffffffff16613aea565b905060068160078111156123b3576123b3615471565b14806123d0575060038160078111156123ce576123ce615471565b145b806123ec575060078160078111156123ea576123ea615471565b145b806124085750600081600781111561240657612406615471565b145b6124455760405162461bcd60e51b815260206004820152600e60248201526d1c1c995d885c1c9bd8d95cdcd95960921b6044820152606401610c84565b816008015461248985858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b146124cb5760405162461bcd60e51b8152602060048201526012602482015271696e636f72726563742063616c6c6461746160701b6044820152606401610c84565b600182015415806124e0575081600101545a10155b61251d5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420656e6f7567682067617360901b6044820152606401610c84565b60068201805461ff0019166101001790558154600190600160a01b900463ffffffff161580159061255c5750825442600160a01b90910463ffffffff16105b15612565575060005b8080156125915750826005015460d25461257f91906156b1565b600284015461258f9060646156b1565b105b1561259a575060005b8080156125ca5750606460d45484600401546125b691906156b1565b6125c091906156d0565b6125c861186e565b105b156125d3575060005b801561264c5760068301805462ff0000191662010000179055604080516020601f870181900481028201810190925285815260009161262d919088908890819084018382808284376000920191909152506140a292505050565b90508061264a5760068401805463ff000000191663010000001790555b505b60068301546040805160ff62010000840481161515825263010000009093049092161515602083015263ffffffff8816917fb4571f7e4e2c2b6e6185e47ab5caa5fe34087299bd49fbae945a4583101ee3f0910160405180910390a25050506126b56001609c55565b505050565b6126c2613cd0565b6126cc60006140cb565b565b6126d6613cd0565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b6066546001600160a01b031661273c613cc6565b6001600160a01b031614806127575750612757610b94613cc6565b6127735760405162461bcd60e51b8152600401610c8490615652565b8281146127925760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c576127e58585838181106127b2576127b261554b565b90506020020160208101906127c79190614e4b565b8484848181106127d9576127d961554b565b9050602002013561411d565b806127ef81615561565b915050612795565b600054610100900460ff16158080156128175750600054600160ff909116105b806128315750303b158015612831575060005460ff166001145b6128945760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff1916600117905580156128b7576000805461ff0019166101001790555b6128bf613d49565b600080600080600080878060200190518101906128dc9190615742565b95509550955095509550955060006001600160a01b0316846001600160a01b03161415801561291357506001600160a01b03831615155b61294d5760405162461bcd60e51b815260206004820152600b60248201526a0c081859191c881d5cd95960aa1b6044820152606401610c84565b6040518060600160405280602d8152602001615b8d602d9139805161297a9160db91602090910190614c9f565b50612983614156565b61298b614185565b6129ca60405180604001604052806004815260200163566f746560e01b815250604051806040016040528060018152602001600d60fa1b8152506141b4565b6129d38361386f565b606680546001600160a01b0385166001600160a01b03199182168117909255606780549091169091179055612a07826141e5565b60cf80546001600160a01b03199081166001600160a01b038981169190911790925560d0805490911687831617905560da8054640100000000600160c01b031916600160201b87841681029190911791829055612a6b929104166000836001614207565b612aac5760405162461bcd60e51b8152602060048201526012602482015271063616c6c206661696c7572652073657475760741b6044820152606401610c84565b60cf5460408051635c975abb60e01b815290517f916f812584e0b001e8c6ab604fa549cc16c9d0b2f60b17aa0b4ff5eefe3e7725926001600160a01b031691635c975abb9160048083019260209291908290030181865afa158015612b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3991906154a1565b60d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb091906154a1565b60d05460d15460d25460d35460d454604080516306fdde0360e01b8152905163ffffffff600160c01b8804811697600160a01b810490911696959493926001600160a01b03909116916306fdde03916004808201926000929091908290030181865afa158015612c24573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c4c91908101906157df565b60d060009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015612c9f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612cc791908101906157df565b612ccf611f55565b612cd7612260565b604051612cef9c9b9a99989796959493929190615827565b60405180910390a1505050505050612d076001609c55565b8015611123576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ff4565b6066546001600160a01b0316612d5d613cc6565b6001600160a01b031614612d835760405162461bcd60e51b8152600401610c8490615505565b60d5805461ff001916610100908117918290556040517fb496b9628e839102454d8b483ba451c4be96675009b637273a00e4ab6a59db72926117ea92900460ff161515815260200190565b6066546001600160a01b0316612de2613cc6565b6001600160a01b03161480612dfd5750612dfd610b94613cc6565b612e195760405162461bcd60e51b8152600401610c8490615652565b828114612e385760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57612e8b858583818110612e5857612e5861554b565b9050602002016020810190612e6d9190614e4b565b848484818110612e7f57612e7f61554b565b9050602002013561421f565b80612e9581615561565b915050612e3b565b6066546001600160a01b0316612eb1613cc6565b6001600160a01b031614612ed75760405162461bcd60e51b8152600401610c8490615505565b6000846001600160a01b0316848484604051612ef49291906158ad565b60006040518083038185875af1925050503d8060008114612f31576040519150601f19603f3d011682016040523d82523d6000602084013e612f36565b606091505b505090508061175c5760405162461bcd60e51b815260206004820152601460248201527363616c6c206661696c757265206578656375746560601b6044820152606401610c84565b612f86613d49565b86421115612fd65760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610c84565b6001600160a01b038816600090815260d8602052604090205486146130265760405162461bcd60e51b8152602060048201526006602482015265216e6f6e636560d01b6044820152606401610c84565b60007f8698fbcc7273f96a670eb203cb707d8ec171123f24eaf075b1e754b71119e59e60d060009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801561309c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130c491908101906157df565b6040516020016130d491906158bd565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905263ffffffff871660c082015285151560e082015261010001604051602081830303815290604052805190602001209050600061315182614258565b90506000613161828787876142a6565b90508a6001600160a01b0316816001600160a01b0316146131b85760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606401610c84565b6001600160a01b0381166131f85760405162461bcd60e51b815260206004820152600760248201526610b9b4b3b732b960c91b6044820152606401610c84565b6001600160a01b038b16600090815260d8602052604081208054600192906132219084906154ed565b909155506132329050818989613e4e565b50505061323f6001609c55565b5050505050505050565b60608060005b84518110156132cc578160008560008885815181106132705761327061554b565b60200260200101515189868151811061328b5761328b61554b565b60200260200101516040516020016132a8969594939291906158d9565b604051602081830303815290604052915080806132c490615561565b91505061324f565b50806040516024016132de91906151a9565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b6066546001600160a01b0316613324613cc6565b6001600160a01b0316148061333f575061333f610b14613cc6565b61337f5760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b613388816141e5565b6040516001600160a01b038216907f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff90600090a250565b6133c7613cd0565b6001600160a01b0381161561346d576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344591906154a1565b61346d576040516358b7533f60e11b81526001600160a01b0382166004820152602401610c84565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6001600160a01b038116600090815260d6602052604081205460048114806134e95750806005145b806118c2575080600614806118cd575060071492915050565b61350a613d49565b60015b818110156135c7578282613522600184615943565b8181106135315761353161554b565b90506020020160208101906135469190614e4b565b6001600160a01b03168383838181106135615761356161554b565b90506020020160208101906135769190614e4b565b6001600160a01b0316116135b55760405162461bcd60e51b815260206004820152600660248201526510b7b93232b960d11b6044820152606401610c84565b806135bf81615561565b91505061350d565b506136078585858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506142c492505050565b61175c6001609c55565b6066546001600160a01b0316613625613cc6565b6001600160a01b031614806136405750613640610b14613cc6565b6136805760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b6000806000806000808680602001905181019061369d919061595a565b949a5092985090965094509250905060648111156136ea5760405162461bcd60e51b815260206004820152600a6024820152696261642071756f72756d60b01b6044820152606401610c84565b606481111561372e5760405162461bcd60e51b815260206004820152601060248201526f3130b21036b4b72932ba32b73a34b7b760811b6044820152606401610c84565b600060d35411801561374a575060d0546001600160a01b031615155b1561379f57613757611f55565b82111561379f5760405162461bcd60e51b815260206004820152601660248201527573706f6e736f72203e20736861726573537570706c7960501b6044820152606401610c84565b63ffffffff8616156137ca5760d0805463ffffffff60a01b1916600160a01b63ffffffff8916021790555b63ffffffff8516156137f55760d0805463ffffffff60c01b1916600160c01b63ffffffff8816021790555b60d184905560d283905560d382905560d48190556040805163ffffffff808916825287166020820152908101859052606081018490526080810183905260a081018290527fc10758ccd7d1dd3330e7bbe13a1a1d6bbb414967932376ee24989bad95edcdc19060c00160405180910390a150505050505050565b613877613cd0565b6001600160a01b0381166138dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b6114b2816140cb565b6001600160a01b038116600090815260d6602052604081205460028114806134e9575080600314806118c2575080600614806118cd575060071492915050565b61392d613d49565b63ffffffff8116600090815260d960205260409020600261394d83613aea565b600781111561395e5761395e615471565b146139955760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60078101546001600160a01b03166139ab613cc6565b6001600160a01b03161480613a53575060d35460d05460078301546001600160a01b0391821691633a46b1a891166139e4600142615943565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015613a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5191906154be565b105b80613a645750613a64610b14613cc6565b613a9f5760405162461bcd60e51b815260206004820152600c60248201526b2163616e63656c6c61626c6560a01b6044820152606401610c84565b60068101805460ff1916600117905560405163ffffffff8316907f8896f24cff41b54acf76c2560861f33cd20fd76c4df0b68a3515c354e4b6c81a90600090a2506114b26001609c55565b63ffffffff818116600090815260d96020908152604080832081516101c08101835281548087168252600160201b8104871694820194909452600160401b8404861681840152600160601b840486166060820152600160801b84048616608080830191909152600160a01b90940490951660a0860152600181015460c0860152600281015460e08601526003810154610100860152600480820154610120870152600582015461014087015282519384019283905293948594909391926101608501929160068501918288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613bb75750505092845250505060078201546001600160a01b03166020820152600890910154604090910152805190915063ffffffff16613c255750600092915050565b6101608101515115613c3a5750600392915050565b604081015163ffffffff16613c525750600192915050565b806060015163ffffffff164211613c6c5750600292915050565b806080015163ffffffff164211613c865750600492915050565b8060e0015181610100015110613c9f5750600792915050565b6101608101516020015115613cb75750600692915050565b50600592915050565b50919050565b600061188a614540565b613cd8613cc6565b6001600160a01b0316613cf36033546001600160a01b031690565b6001600160a01b0316146126cc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b6002609c541415613d9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c84565b6002609c55565b6001609c55565b60cf546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015b600060405180830381600087803b158015613df957600080fd5b505af1158015613e0d573d6000803e3d6000fd5b505050505050565b60cf54604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b63ffffffff8216600090815260d9602052604090206002613e6e84613aea565b6007811115613e7f57613e7f615471565b14613eb65760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60d0548154604051630748d63560e31b81526001600160a01b038781166004830152600160401b90920463ffffffff1660248201526000929190911690633a46b1a890604401602060405180830381865afa158015613f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3d91906154be565b905060008111613f795760405162461bcd60e51b815260206004820152600760248201526610b6b2b6b132b960c91b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff8816845290915290205460ff1615613fdb5760405162461bcd60e51b81526020600482015260056024820152641d9bdd195960da1b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff881684529091528120805460ff1916600117905561401761186e565b9050826004015481111561402d57600483018190555b8315614042576002830180548301905561404d565b600383018054830190555b8315158563ffffffff16876001600160a01b03167f786755545a7e27c12c90cc7f0934514d03fdacfe3684a340b8c4100531e7ecd58560405161409291815260200190565b60405180910390a4505050505050565b60da546000906140c590600160201b90046001600160a01b031682846001614207565b92915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60d054604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b600054610100900460ff1661417d5760405162461bcd60e51b8152600401610c84906159b8565b6126cc614574565b600054610100900460ff166141ac5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145ab565b600054610100900460ff166141db5760405162461bcd60e51b8152600401610c84906159b8565b61112382826145d2565b60ce80546001600160a01b0319166001600160a01b0392909216919091179055565b600061421585858585614613565b5095945050505050565b60d0546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401613ddf565b60006140c5614265614812565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006142b78787878761488d565b9150915061421581614951565b60006142ce61186e565b905082156142e7576142e76142e1613cc6565b84613e15565b83156142fe576142fe6142f8613cc6565b8561411d565b60005b82518110156144ec57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031684838151811061433c5761433c61554b565b60200260200101516001600160a01b0316141561436657506067546001600160a01b031631614434565b600084838151811061437a5761437a61554b565b602090810291909101810151606754604080516001600160a01b03928316602480830191909152825180830390910181526044909101825293840180516001600160e01b03166370a0823160e01b179052519116916143d8916158bd565b600060405180830381855afa9150503d8060008114614413576040519150601f19603f3d011682016040523d82523d6000602084013e614418565b606091505b509150508080602001905181019061443091906154be565b9150505b6000838261444289896154ed565b61444c91906156b1565b61445691906156d0565b905080156144d75773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031685848151811061448e5761448e61554b565b60200260200101516001600160a01b0316146144cd576144c88584815181106144b9576144b961554b565b60200260200101518983614a9f565b6144d7565b6144d78882614b6e565b505080806144e490615561565b915050614301565b5083836144f7613cc6565b6001600160a01b03167fa21c268847f2b8adac3751ed0683330abe9fdd6cc4a7a8fc6787633d4126e0d48886604051614531929190615a03565b60405180910390a45050505050565b60006014361080159061455d575060ce546001600160a01b031633145b1561456f575060131936013560601c90565b503390565b600054610100900460ff1661459b5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145a6613cc6565b6140cb565b600054610100900460ff16613da35760405162461bcd60e51b8152600401610c84906159b8565b600054610100900460ff166145f95760405162461bcd60e51b8152600401610c84906159b8565b815160209283012081519190920120606891909155606955565b6065546000906060906001600160a01b0316801561478557604051633af85da960e11b81526001600160a01b038216906375f0bb529061466a908a908a908a908a9060009081908190819081903390600401615a73565b600060405180830381600087803b15801561468457600080fd5b505af1158015614698573d6000803e3d6000fd5b5050606754604051635229073f60e01b81526001600160a01b039091169250635229073f91506146d2908a908a908a908a90600401615afd565b6000604051808303816000875af11580156146f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526147199190810190615b3c565b604051631264e26d60e31b815260006004820152821515602482015291945092506001600160a01b03821690639327136890604401600060405180830381600087803b15801561476857600080fd5b505af115801561477c573d6000803e3d6000fd5b50505050614808565b606754604051635229073f60e01b81526001600160a01b0390911690635229073f906147bb908a908a908a908a90600401615afd565b6000604051808303816000875af11580156147da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148029190810190615b3c565b90935091505b5094509492505050565b600061188a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61484160685490565b6069546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614948565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614918573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661494157600060019250925050614948565b9150600090505b94509492505050565b600081600481111561496557614965615471565b141561496e5750565b600181600481111561498257614982615471565b14156149d05760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c84565b60028160048111156149e4576149e4615471565b1415614a325760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b6003816004811115614a4657614a46615471565b14156114b25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b600080614b0785600063a9059cbb8787604051602401614ad49291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506000614bd2565b91509150818015614b30575080511580614b30575080806020019051810190614b3091906154a1565b61175c5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610c84565b6000614b8c8383604051806020016040528060008152506000614bd2565b509050806126b55760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606401610c84565b60006060614be286868686614613565b9097909650945050505050565b600183019183908215614c715791602002820160005b83821115614c4257835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c05565b8015614c6f5782816101000a81549060ff0219169055600101602081600001049283019260010302614c42565b505b50614c7d929150614d13565b5090565b60405180608001604052806004906020820280368337509192915050565b828054614cab9061567c565b90600052602060002090601f016020900481019282614ccd5760008555614c71565b82601f10614ce657805160ff1916838001178555614c71565b82800160010185558215614c71579182015b82811115614c71578251825591602001919060010190614cf8565b5b80821115614c7d5760008155600101614d14565b600060208284031215614d3a57600080fd5b5035919050565b60006101a08201905063ffffffff8f16825263ffffffff8e16602083015263ffffffff8d16604083015263ffffffff8c16606083015263ffffffff8b16608083015263ffffffff8a1660a08301528860c08301528760e0830152866101008301528561012083015284610140830152614dc66101608301856001600160a01b03169052565b826101808301529e9d5050505050505050505050505050565b80151581146114b257600080fd5b60008060408385031215614e0057600080fd5b8235614e0b81614ddf565b91506020830135614e1b81614ddf565b809150509250929050565b6001600160a01b03811681146114b257600080fd5b8035614e4681614e26565b919050565b600060208284031215614e5d57600080fd5b81356118cd81614e26565b63ffffffff811681146114b257600080fd5b600060208284031215614e8c57600080fd5b81356118cd81614e68565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008060008060408587031215614ef857600080fd5b84356001600160401b0380821115614f0f57600080fd5b614f1b88838901614e97565b90965094506020870135915080821115614f3457600080fd5b50614f4187828801614e97565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f8b57614f8b614f4d565b604052919050565b60006001600160401b03821115614fac57614fac614f4d565b50601f01601f191660200190565b600082601f830112614fcb57600080fd5b8135614fde614fd982614f93565b614f63565b818152846020838601011115614ff357600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561502257600080fd5b81356001600160401b0381111561503857600080fd5b61504484828501614fba565b949350505050565b60008083601f84011261505e57600080fd5b5081356001600160401b0381111561507557600080fd5b602083019150836020828501011115614edb57600080fd5b600080600080600080608087890312156150a657600080fd5b86356001600160401b03808211156150bd57600080fd5b6150c98a838b0161504c565b9098509650602089013591506150de82614e68565b90945060408801359350606088013590808211156150fb57600080fd5b5061510889828a0161504c565b979a9699509497509295939492505050565b60808101818360005b60048110156151445781511515835260209283019290910190600101615123565b50505092915050565b60005b83811015615168578181015183820152602001615150565b83811115615177576000848401525b50505050565b6000815180845261519581602086016020860161514d565b601f01601f19169290920160200192915050565b6020815260006118cd602083018461517d565b600080604083850312156151cf57600080fd5b8235614e0b81614e68565b6000806000604084860312156151ef57600080fd5b83356151fa81614e68565b925060208401356001600160401b0381111561521557600080fd5b6152218682870161504c565b9497909650939450505050565b6000806000806060858703121561524457600080fd5b843561524f81614e26565b93506020850135925060408501356001600160401b0381111561527157600080fd5b614f418782880161504c565b600080600080600080600080610100898b03121561529a57600080fd5b88356152a581614e26565b9750602089013596506040890135955060608901356152c381614e68565b945060808901356152d381614ddf565b935060a089013560ff811681146152e957600080fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121561531957600080fd5b823561532481614e26565b91506020830135614e1b81614e68565b6000806040838503121561534757600080fd5b82356001600160401b038082111561535e57600080fd5b818501915085601f83011261537257600080fd5b813560208282111561538657615386614f4d565b8160051b615395828201614f63565b928352848101820192828101908a8511156153af57600080fd5b83870192505b848310156153eb578235868111156153cd5760008081fd5b6153db8c86838b0101614fba565b83525091830191908301906153b5565b97506153fb915050878201614e3b565b9450505050509250929050565b60008060008060006080868803121561542057600080fd5b853561542b81614e26565b9450602086013593506040860135925060608601356001600160401b0381111561545457600080fd5b61546088828901614e97565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b602081016008831061549b5761549b615471565b91905290565b6000602082840312156154b357600080fd5b81516118cd81614ddf565b6000602082840312156154d057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615500576155006154d7565b500190565b602080825260059082015264085898585b60da1b604082015260600190565b6020808252600d908201526c2161727261792070617269747960981b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615575576155756154d7565b5060010190565b600063ffffffff80831681811415615596576155966154d7565b6001019392505050565b600063ffffffff8083168185168083038211156155bf576155bf6154d7565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808c16835260e0602084015261561260e084018b8d6155c8565b818a16604085015288606085015287151560808501528660a085015283810360c08501526156418186886155c8565b9d9c50505050505050505050505050565b60208082526010908201526f10b130b0b610131010b6b0b730b3b2b960811b604082015260600190565b600181811c9082168061569057607f821691505b60208210811415613cc057634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156156cb576156cb6154d7565b500290565b6000826156ed57634e487b7160e01b600052601260045260246000fd5b500490565b6000615700614fd984614f93565b905082815283838301111561571457600080fd5b6118cd83602083018461514d565b600082601f83011261573357600080fd5b6118cd838351602085016156f2565b60008060008060008060c0878903121561575b57600080fd5b865161576681614e26565b602088015190965061577781614e26565b604088015190955061578881614e26565b606088015190945061579981614e26565b60808801519093506157aa81614e26565b60a08801519092506001600160401b038111156157c657600080fd5b6157d289828a01615722565b9150509295509295509295565b6000602082840312156157f157600080fd5b81516001600160401b0381111561580757600080fd5b8201601f8101841361581857600080fd5b615044848251602084016156f2565b60006101808e151583528d1515602084015263ffffffff808e166040850152808d166060850152508a60808401528960a08401528860c08401528760e08401528061010084015261587a8184018861517d565b905082810361012084015261588f818761517d565b610140840195909552505061016001529a9950505050505050505050565b8183823760009101908152919050565b600082516158cf81846020870161514d565b9190910192915050565b600087516158eb818460208c0161514d565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b166001820152856015820152846035820152835161593381605584016020880161514d565b0160550198975050505050505050565b600082821015615955576159556154d7565b500390565b60008060008060008060c0878903121561597357600080fd5b865161597e81614e68565b602088015190965061598f81614e68565b6040880151606089015160808a015160a0909a0151989b929a5090989097909650945092505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b81811015615a51578551851683529483019491830191600101615a33565b509098975050505050505050565b60028110615a6f57615a6f615471565b9052565b6001600160a01b038b81168252602082018b905261016060408301819052600091615aa08483018d61517d565b9150615aaf606085018c615a5f565b608084019990995260a08301979097525060c081019490945291851660e084015284166101008301528183036101208301526000835290921661014090920191909152602001949350505050565b60018060a01b0385168152836020820152608060408201526000615b24608083018561517d565b9050615b336060830184615a5f565b95945050505050565b60008060408385031215615b4f57600080fd5b8251615b5a81614ddf565b60208401519092506001600160401b03811115615b7657600080fd5b615b8285828601615722565b915050925092905056fe322e322e352b6f70656e67736e2e70617961626c65776974686261616c2e6972656c6179726563697069656e74a2646970667358221220e7f7a8af70f47c4c0a43ae70fdb50ef5f9643adc80e4e50e8e0c3ddc18ff5f7f64736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": { + "burnLoot(address[],uint256[])": { + "params": { + "amount": "Array of amounts to burn", + "from": "Array of addresses to lose loot" + } + }, + "burnShares(address[],uint256[])": { + "params": { + "amount": "Array of amounts to burn", + "from": "Array of addresses to lose shares" + } + }, + "cancelProposal(uint32)": { + "details": "Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold", + "params": { + "id": "Number of proposal in `proposals` mapping to process for execution." + } + }, + "executeAsBaal(address,uint256,bytes)": { + "details": "Function to Execute arbitrary code as baal - useful if funds are accidentally sent here", + "params": { + "_data": "arbitrary transaction data", + "_to": "address to call", + "_value": "value to include in wei" + } + }, + "getProposalStatus(uint32)": { + "params": { + "id": "Number of proposal in proposals" + }, + "returns": { + "_0": "[cancelled, processed, passed, actionFailed]" + } + }, + "isAdmin(address)": { + "params": { + "shaman": "Address attempting to execute admin permissioned functions" + } + }, + "isGovernor(address)": { + "params": { + "shaman": "Address attempting to execute governor permissioned functions" + } + }, + "isManager(address)": { + "params": { + "shaman": "Address attempting to execute manager permissioned functions" + } + }, + "mintLoot(address[],uint256[])": { + "params": { + "amount": "Array of amounts to mint", + "to": "Array of addresses to mint loot" + } + }, + "mintShares(address[],uint256[])": { + "params": { + "amount": "Array of amounts to mint", + "to": "Array of addresses to receive shares" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "processProposal(uint32,bytes)": { + "details": "Proposal must have succeeded, not been processed, not expired, retention threshold must be met", + "params": { + "id": "Number of proposal in `proposals` mapping to process for execution.", + "proposalData": "Packed multisend data to execute via Gnosis multisend library" + } + }, + "ragequit(address,uint256,uint256,address[])": { + "params": { + "lootToBurn": "Baal pure economic weight to burn.", + "sharesToBurn": "Baal voting weight to burn.", + "to": "Account that receives 'fair share'.", + "tokens": "Array of tokens to include in rage quit calculation" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setAdminConfig(bool,bool)": { + "params": { + "pauseLoot": "Turn loot transfers on or off", + "pauseShares": "Turn share transfers on or off" + } + }, + "setAvatar(address)": { + "details": "Sets the avatar to a new avatar (`newAvatar`)." + }, + "setGovernanceConfig(bytes)": { + "params": { + "_governanceConfig": "Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound" + } + }, + "setGuard(address)": { + "details": "Set a guard that checks transactions before execution.", + "params": { + "_guard": "The address of the guard to be used or the 0 address to disable the guard." + } + }, + "setShamans(address[],uint256[])": { + "params": { + "_permissions": "Permission level of each shaman in _shamans", + "_shamans": "Addresses of shaman contracts" + } + }, + "setTarget(address)": { + "details": "Sets the target to a new target (`newTarget`)." + }, + "setTrustedForwarder(address)": { + "params": { + "_trustedForwarderAddress": "Trusted forwarder's address" + } + }, + "setUp(bytes)": { + "params": { + "_initializationParams": "Encoded setup information." + } + }, + "sponsorProposal(uint32)": { + "params": { + "id": "Number of proposal in `proposals` mapping to sponsor." + } + }, + "state(uint32)": { + "params": { + "id": "Number of proposal in proposals" + }, + "returns": { + "_0": "Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed \\-> Cancelled \\-> Defeated" + } + }, + "submitProposal(bytes,uint32,uint256,string)": { + "params": { + "details": "Context for proposal.", + "proposalData": "Multisend encoded transactions or proposal data" + }, + "returns": { + "_0": "proposal Count for submitted proposal." + } + }, + "submitVote(uint32,bool)": { + "params": { + "approved": "If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.", + "id": "Number of proposal in `proposals` mapping to cast vote on." + } + }, + "submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)": { + "params": { + "approved": "If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.", + "expiry": "Expiration of signature.", + "id": "Number of proposal in `proposals` mapping to cast vote on.", + "r": "r in signature", + "s": "s in signature", + "v": "v in signature", + "voter": "Address of member who submitted vote." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "Baal ';_;'.", + "version": 1 + }, + "userdoc": { + "errors": { + "NotIERC165Compliant(address)": [ + { + "notice": "`guard_` does not implement IERC165." + } + ] + }, + "kind": "user", + "methods": { + "burnLoot(address[],uint256[])": { + "notice": "Baal-or-manager-only function to burn loot." + }, + "burnShares(address[],uint256[])": { + "notice": "Baal-or-manager-only function to burn shares." + }, + "cancelProposal(uint32)": { + "notice": "Cancel proposal prior to execution" + }, + "executeAsBaal(address,uint256,bytes)": { + "notice": "Can only be called by the avatar which means this can only be called if passed by another proposal or by a delegated signer on the Safe" + }, + "getProposalStatus(uint32)": { + "notice": "Helper to get recorded proposal flags" + }, + "hashOperation(bytes)": { + "notice": "Returns the keccak256 hash of calldata" + }, + "isAdmin(address)": { + "notice": "Helper to check if shaman permission contains admin capabilities" + }, + "isGovernor(address)": { + "notice": "Helper to check if shaman permission contains governor capabilities" + }, + "isManager(address)": { + "notice": "Helper to check if shaman permission contains manager capabilities" + }, + "isTrustedForwarder(address)": { + "notice": "return if the forwarder is trusted to forward relayed transactions to us. the forwarder is required to verify the sender's signature, and verify the call is not a replay." + }, + "lockAdmin()": { + "notice": "Lock admin so setShamans cannot be called with admin changes" + }, + "lockGovernor()": { + "notice": "Lock governor so setShamans cannot be called with governor changes" + }, + "lockManager()": { + "notice": "Lock manager so setShamans cannot be called with manager changes" + }, + "mintLoot(address[],uint256[])": { + "notice": "Baal-or-manager-only function to mint loot." + }, + "mintShares(address[],uint256[])": { + "notice": "Baal-or-manager-only function to mint shares." + }, + "processProposal(uint32,bytes)": { + "notice": "Process `proposal` & execute internal functions." + }, + "ragequit(address,uint256,uint256,address[])": { + "notice": "Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`" + }, + "setAdminConfig(bool,bool)": { + "notice": "Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token" + }, + "setAvatar(address)": { + "notice": "Can only be called by the current owner." + }, + "setGovernanceConfig(bytes)": { + "notice": "Baal-or-governance-only function to change periods." + }, + "setShamans(address[],uint256[])": { + "notice": "Baal-only function to set shaman status." + }, + "setTarget(address)": { + "notice": "Can only be called by the current owner." + }, + "setTrustedForwarder(address)": { + "notice": "Baal-or-governance only function to set trusted forwarder for meta-transactions." + }, + "setUp(bytes)": { + "notice": "Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights." + }, + "sponsorProposal(uint32)": { + "notice": "Sponsor proposal to Baal `members` for approval within voting period." + }, + "state(uint32)": { + "notice": "State helper to determine proposal state" + }, + "submitProposal(bytes,uint32,uint256,string)": { + "notice": "Submit proposal to Baal `members` for approval within given voting period." + }, + "submitVote(uint32,bool)": { + "notice": "Submit vote - proposal must exist & voting period must not have ended." + }, + "submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)": { + "notice": "Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended." + }, + "totalLoot()": { + "notice": "Helper to check total supply of child loot contract" + }, + "totalShares()": { + "notice": "Helper to check total supply of child shares contract" + }, + "totalSupply()": { + "notice": "Helper to check total supply of loot and shares" + } + }, + "notice": "Flexible guild contract inspired by Moloch DAO framework.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/Baal.sol:Baal", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/Baal.sol:Baal", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/Baal.sol:Baal", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3614, + "contract": "contracts/Baal.sol:Baal", + "label": "guard", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 3191, + "contract": "contracts/Baal.sol:Baal", + "label": "avatar", + "offset": 0, + "slot": "102", + "type": "t_address" + }, + { + "astId": 3194, + "contract": "contracts/Baal.sol:Baal", + "label": "target", + "offset": 0, + "slot": "103", + "type": "t_address" + }, + { + "astId": 7403, + "contract": "contracts/Baal.sol:Baal", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "104", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/Baal.sol:Baal", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "105", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "106", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4893, + "contract": "contracts/Baal.sol:Baal", + "label": "_status", + "offset": 0, + "slot": "156", + "type": "t_uint256" + }, + { + "astId": 4951, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "157", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3804, + "contract": "contracts/Baal.sol:Baal", + "label": "_trustedForwarder", + "offset": 0, + "slot": "206", + "type": "t_address" + }, + { + "astId": 10058, + "contract": "contracts/Baal.sol:Baal", + "label": "lootToken", + "offset": 0, + "slot": "207", + "type": "t_contract(IBaalToken)14080" + }, + { + "astId": 10061, + "contract": "contracts/Baal.sol:Baal", + "label": "sharesToken", + "offset": 0, + "slot": "208", + "type": "t_contract(IBaalToken)14080" + }, + { + "astId": 10066, + "contract": "contracts/Baal.sol:Baal", + "label": "votingPeriod", + "offset": 20, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10068, + "contract": "contracts/Baal.sol:Baal", + "label": "gracePeriod", + "offset": 24, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10070, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalCount", + "offset": 28, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10072, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalOffering", + "offset": 0, + "slot": "209", + "type": "t_uint256" + }, + { + "astId": 10074, + "contract": "contracts/Baal.sol:Baal", + "label": "quorumPercent", + "offset": 0, + "slot": "210", + "type": "t_uint256" + }, + { + "astId": 10076, + "contract": "contracts/Baal.sol:Baal", + "label": "sponsorThreshold", + "offset": 0, + "slot": "211", + "type": "t_uint256" + }, + { + "astId": 10078, + "contract": "contracts/Baal.sol:Baal", + "label": "minRetentionPercent", + "offset": 0, + "slot": "212", + "type": "t_uint256" + }, + { + "astId": 10080, + "contract": "contracts/Baal.sol:Baal", + "label": "adminLock", + "offset": 0, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10082, + "contract": "contracts/Baal.sol:Baal", + "label": "managerLock", + "offset": 1, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10084, + "contract": "contracts/Baal.sol:Baal", + "label": "governorLock", + "offset": 2, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10088, + "contract": "contracts/Baal.sol:Baal", + "label": "shamans", + "offset": 0, + "slot": "214", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10094, + "contract": "contracts/Baal.sol:Baal", + "label": "memberVoted", + "offset": 0, + "slot": "215", + "type": "t_mapping(t_address,t_mapping(t_uint32,t_bool))" + }, + { + "astId": 10098, + "contract": "contracts/Baal.sol:Baal", + "label": "votingNonces", + "offset": 0, + "slot": "216", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10103, + "contract": "contracts/Baal.sol:Baal", + "label": "proposals", + "offset": 0, + "slot": "217", + "type": "t_mapping(t_uint256,t_struct(Proposal)10146_storage)" + }, + { + "astId": 10105, + "contract": "contracts/Baal.sol:Baal", + "label": "latestSponsoredProposalId", + "offset": 0, + "slot": "218", + "type": "t_uint32" + }, + { + "astId": 10107, + "contract": "contracts/Baal.sol:Baal", + "label": "multisendLibrary", + "offset": 4, + "slot": "218", + "type": "t_address" + }, + { + "astId": 10110, + "contract": "contracts/Baal.sol:Baal", + "label": "versionRecipient", + "offset": 0, + "slot": "219", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bool)4_storage": { + "base": "t_bool", + "encoding": "inplace", + "label": "bool[4]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IBaalToken)14080": { + "encoding": "inplace", + "label": "contract IBaalToken", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint32,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint32 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint32,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_struct(Proposal)10146_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Baal.Proposal)", + "numberOfBytes": "32", + "value": "t_struct(Proposal)10146_storage" + }, + "t_mapping(t_uint32,t_bool)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Proposal)10146_storage": { + "encoding": "inplace", + "label": "struct Baal.Proposal", + "members": [ + { + "astId": 10117, + "contract": "contracts/Baal.sol:Baal", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10119, + "contract": "contracts/Baal.sol:Baal", + "label": "prevProposalId", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10121, + "contract": "contracts/Baal.sol:Baal", + "label": "votingStarts", + "offset": 8, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10123, + "contract": "contracts/Baal.sol:Baal", + "label": "votingEnds", + "offset": 12, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10125, + "contract": "contracts/Baal.sol:Baal", + "label": "graceEnds", + "offset": 16, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10127, + "contract": "contracts/Baal.sol:Baal", + "label": "expiration", + "offset": 20, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10129, + "contract": "contracts/Baal.sol:Baal", + "label": "baalGas", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 10131, + "contract": "contracts/Baal.sol:Baal", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 10133, + "contract": "contracts/Baal.sol:Baal", + "label": "noVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 10135, + "contract": "contracts/Baal.sol:Baal", + "label": "maxTotalSharesAndLootAtVote", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 10137, + "contract": "contracts/Baal.sol:Baal", + "label": "maxTotalSharesAtSponsor", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 10141, + "contract": "contracts/Baal.sol:Baal", + "label": "status", + "offset": 0, + "slot": "6", + "type": "t_array(t_bool)4_storage" + }, + { + "astId": 10143, + "contract": "contracts/Baal.sol:Baal", + "label": "sponsor", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 10145, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalDataHash", + "offset": 0, + "slot": "8", + "type": "t_bytes32" + } + ], + "numberOfBytes": "288" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/BaalAdvTokenSummoner.json b/deployments/base/BaalAdvTokenSummoner.json new file mode 100644 index 0000000..b6a38ba --- /dev/null +++ b/deployments/base/BaalAdvTokenSummoner.json @@ -0,0 +1,375 @@ +{ + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_safeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_forwarderAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initializationMintParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "initializationTokenParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "postInitializationActions", + "type": "bytes[]" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "transactionIndex": 5, + "gasUsed": "333334", + "logsBloom": "0x00000000000000000000000000000000400000000000200000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000500000000000000000000000000000000000004000a00080000000000000000400000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000020000000200000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f", + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d69e5b8f6fa0e5d94b93848700655a78df24e387" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + }, + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + }, + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 8, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + } + ], + "blockNumber": 7428979, + "cumulativeGasUsed": "695117", + "status": 1, + "byzantium": true + }, + "args": [ + "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/BaalAdvTokenSummoner_Implementation.json b/deployments/base/BaalAdvTokenSummoner_Implementation.json new file mode 100644 index 0000000..cc4041a --- /dev/null +++ b/deployments/base/BaalAdvTokenSummoner_Implementation.json @@ -0,0 +1,455 @@ +{ + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_safeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_forwarderAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initializationMintParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "initializationTokenParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "postInitializationActions", + "type": "bytes[]" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [], + "stateMutability": "nonpayable", + "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" + } + ], + "transactionHash": "0x28b90921b1d0ef5e696bf0c3c761cf29ace436fc6cbd105b78228638a2cbbec4", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "transactionIndex": 3, + "gasUsed": "2166814", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000002000000000000000000000000000000000000002000000000000000000200000000000000000000", + "blockHash": "0xff76e1472dea2d468c1b509a166e2eac29508d2baf5484f6f9dd1a03db7fc3c1", + "transactionHash": "0x28b90921b1d0ef5e696bf0c3c761cf29ace436fc6cbd105b78228638a2cbbec4", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 7428977, + "transactionHash": "0x28b90921b1d0ef5e696bf0c3c761cf29ace436fc6cbd105b78228638a2cbbec4", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 8, + "blockHash": "0xff76e1472dea2d468c1b509a166e2eac29508d2baf5484f6f9dd1a03db7fc3c1" + } + ], + "blockNumber": 7428977, + "cumulativeGasUsed": "3288349", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"name\":\"DeployBaalTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"summoner\",\"type\":\"address\"}],\"name\":\"setSummoner\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_baalSummoner\",\"outputs\":[{\"internalType\":\"contract IBaalSummoner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baalSummoner\",\"type\":\"address\"}],\"name\":\"setSummonerAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_safeAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_forwarderAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"initializationMintParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initializationTokenParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"postInitializationActions\",\"type\":\"bytes[]\"}],\"name\":\"summonBaalFromReferrer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setSummonerAddr(address)\":{\"details\":\"Sets the address of the BaalSummoner contract\",\"params\":{\"baalSummoner\":\"The address of the BaalSummoner contract\"}},\"summonBaalFromReferrer(address,address,uint256,bytes,bytes,bytes[])\":{\"details\":\"Summon a new Baal contract with a new set of tokens\",\"params\":{\"_forwarderAddr\":\"The address of the forwarder to be used, 0x0 if not set\",\"_safeAddr\":\"The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\",\"_saltNonce\":\"The salt nonce to be used for the Safe contract\",\"initializationMintParams\":\"The parameters for minting the tokens\",\"initializationTokenParams\":\"The parameters for deploying the tokens\",\"postInitializationActions\":\"The actions to be performed after the initialization\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/higherOrderFactories/BaalAdvTokenSummoner.sol\":\"BaalAdvTokenSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\\n/// @author Richard Meissner - \\ninterface IProxy {\\n function masterCopy() external view returns (address);\\n}\\n\\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafeProxy {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\\n address internal singleton;\\n\\n /// @dev Constructor function sets address of singleton contract.\\n /// @param _singleton Singleton address.\\n constructor(address _singleton) {\\n require(_singleton != address(0), \\\"Invalid singleton address provided\\\");\\n singleton = _singleton;\\n }\\n\\n /// @dev Fallback function forwards all transactions and returns all received return data.\\n fallback() external payable {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\\n // 0xa619486e == keccak(\\\"masterCopy()\\\"). The value is right padded to 32-bytes with 0s\\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\\n mstore(0, _singleton)\\n return(0, 0x20)\\n }\\n calldatacopy(0, 0, calldatasize())\\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if eq(success, 0) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3bfdd453d9f896f7029d15bcafd11886957b320ad1764309d9f74fa059715249\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./GnosisSafeProxy.sol\\\";\\nimport \\\"./IProxyCreationCallback.sol\\\";\\n\\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n/// @author Stefan George - \\ncontract GnosisSafeProxyFactory {\\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param singleton Address of singleton contract.\\n /// @param data Payload for message call sent to new proxy contract.\\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\\n proxy = new GnosisSafeProxy(singleton);\\n if (data.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, singleton);\\n }\\n\\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\\n function proxyRuntimeCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).runtimeCode;\\n }\\n\\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\\n function proxyCreationCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).creationCode;\\n }\\n\\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\\n /// This method is only meant as an utility to be called from other methods\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function deployProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) internal returns (GnosisSafeProxy proxy) {\\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\\n }\\n require(address(proxy) != address(0), \\\"Create2 call failed\\\");\\n }\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function createProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n if (initializer.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, _singleton);\\n }\\n\\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\\n function createProxyWithCallback(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce,\\n IProxyCreationCallback callback\\n ) public returns (GnosisSafeProxy proxy) {\\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\\n }\\n\\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function calculateCreateProxyWithNonceAddress(\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n revert(string(abi.encodePacked(proxy)));\\n }\\n}\\n\",\"keccak256\":\"0x187c6f84c71b432da6721c1b81cebfbb9c37c0cc15ebd8de5a14ff7ec6db2d9e\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"./GnosisSafeProxy.sol\\\";\\n\\ninterface IProxyCreationCallback {\\n function proxyCreated(\\n GnosisSafeProxy proxy,\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external;\\n}\\n\",\"keccak256\":\"0x51a9ce914a6a943651c803541e44218a7ed0a2f98a94d55df66b173b5a11e365\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\ncontract ModuleProxyFactory {\\n event ModuleProxyCreation(\\n address indexed proxy,\\n address indexed masterCopy\\n );\\n\\n /// `target` can not be zero.\\n error ZeroAddress(address target);\\n\\n /// `target` has no code deployed.\\n error TargetHasNoCode(address target);\\n\\n /// `address_` is already taken.\\n error TakenAddress(address address_);\\n\\n /// @notice Initialization failed.\\n error FailedInitialization();\\n\\n function createProxy(address target, bytes32 salt)\\n internal\\n returns (address result)\\n {\\n if (address(target) == address(0)) revert ZeroAddress(target);\\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\\n bytes memory deployment = abi.encodePacked(\\n hex\\\"602d8060093d393df3363d3d373d3d3d363d73\\\",\\n target,\\n hex\\\"5af43d82803e903d91602b57fd5bf3\\\"\\n );\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\\n }\\n if (result == address(0)) revert TakenAddress(result);\\n }\\n\\n function deployModule(\\n address masterCopy,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (address proxy) {\\n proxy = createProxy(\\n masterCopy,\\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\\n );\\n (bool success, ) = proxy.call(initializer);\\n if (!success) revert FailedInitialization();\\n\\n emit ModuleProxyCreation(proxy, masterCopy);\\n }\\n}\\n\",\"keccak256\":\"0x40a3eb64fec76f1f77656a77b4c469b299f2d8b0523ed0f207d3879455c06a70\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/higherOrderFactories/BaalAdvTokenSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"../Baal.sol\\\";\\nimport \\\"../interfaces/IBaalSummoner.sol\\\";\\n\\ncontract BaalAdvTokenSummoner is\\n Initializable,\\n OwnableUpgradeable,\\n UUPSUpgradeable\\n{\\n IBaalSummoner public _baalSummoner;\\n\\n event setSummoner(address summoner);\\n\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function initialize() public initializer {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n /**\\n * @dev Sets the address of the BaalSummoner contract\\n * @param baalSummoner The address of the BaalSummoner contract\\n */\\n function setSummonerAddr(address baalSummoner) public onlyOwner {\\n require(baalSummoner != address(0), \\\"zero address\\\");\\n _baalSummoner = IBaalSummoner(baalSummoner);\\n emit setSummoner(baalSummoner);\\n }\\n\\n /**\\n * @dev Summon a new Baal contract with a new set of tokens\\n * @param _safeAddr The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\\n * @param _forwarderAddr The address of the forwarder to be used, 0x0 if not set\\n * @param _saltNonce The salt nonce to be used for the Safe contract\\n * @param initializationMintParams The parameters for minting the tokens\\n * @param initializationTokenParams The parameters for deploying the tokens\\n * @param postInitializationActions The actions to be performed after the initialization\\n */\\n function summonBaalFromReferrer(\\n address _safeAddr,\\n address _forwarderAddr,\\n uint256 _saltNonce,\\n bytes calldata initializationMintParams,\\n bytes calldata initializationTokenParams,\\n bytes[] calldata postInitializationActions\\n ) external {\\n // summon tokens\\n (address _lootToken, address _sharesToken) = deployTokens(\\n initializationTokenParams\\n );\\n\\n // mint shares loot tokens\\n mintTokens(initializationMintParams, _lootToken, _sharesToken);\\n\\n // summon baal with new tokens\\n address _baal = _baalSummoner.summonBaalFromReferrer(\\n abi.encode(\\n IBaalToken(_sharesToken).name(), \\n IBaalToken(_sharesToken).symbol(),\\n _safeAddr,\\n _forwarderAddr,\\n _lootToken,\\n _sharesToken\\n ),\\n postInitializationActions,\\n _saltNonce,\\n bytes32(bytes(\\\"DHAdvTokenSummoner\\\")) // referrer\\n );\\n\\n // change token ownership to baal\\n IBaalToken(_lootToken).transferOwnership(address(_baal));\\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\\n }\\n\\n /**\\n * @dev mintTokens\\n * @param initializationTokens The parameters for minting the tokens\\n * @param _lootToken The loot token address\\n * @param _sharesToken The shares token address\\n */\\n function mintTokens(\\n bytes calldata initializationTokens,\\n address _lootToken,\\n address _sharesToken\\n ) internal {\\n (\\n address[] memory summoners, // The address to mint initial tokens to\\n uint256[] memory summonerShares, // The amount of shares to mint\\n uint256[] memory summonerLoot // The amount of loot to mint\\n ) = abi.decode(initializationTokens, (address[], uint256[], uint256[]));\\n\\n require(\\n summoners.length == summonerShares.length &&\\n summoners.length == summonerLoot.length,\\n \\\"!array parity\\\"\\n ); /*check array lengths match*/\\n\\n for (uint256 i = 0; i < summoners.length; i++) {\\n if (summonerLoot[i] > 0) {\\n IBaalToken(_lootToken).mint(\\n summoners[i],\\n summonerLoot[i]\\n ); /*grant `to` `amount` `loot`*/\\n }\\n if (summonerShares[i] > 0) {\\n IBaalToken(_sharesToken).mint(\\n summoners[i],\\n summonerShares[i]\\n ); /*grant `to` `amount` `shares`*/\\n }\\n }\\n }\\n\\n /**\\n * @dev deployTokens\\n * @param initializationParams The parameters for deploying the tokens\\n */\\n function deployTokens(\\n bytes calldata initializationParams\\n ) internal returns (address lootToken, address sharesToken) {\\n (\\n string\\n memory _name /*_name Name for erc20 `shares` accounting, empty if token */,\\n string\\n memory _symbol /*_symbol Symbol for erc20 `shares` accounting, empty if token*/,\\n string\\n memory _lootName /* name for erc20 `loot` accounting, empty if token */,\\n string\\n memory _lootSymbol /* symbol for erc20 `loot` accounting, empty if token*/,\\n bool _transferableShares /* if shares is transferable */,\\n bool _transferableLoot /* if loot is transferable */\\n ) = abi.decode(\\n initializationParams,\\n (string, string, string, string, bool, bool)\\n );\\n\\n address lootSingleton = _baalSummoner.lootSingleton();\\n address sharesSingleton = _baalSummoner.sharesSingleton();\\n\\n lootToken = address(\\n new ERC1967Proxy(\\n lootSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(lootSingleton).setUp.selector,\\n _lootName,\\n _lootSymbol\\n )\\n )\\n );\\n\\n sharesToken = address(\\n new ERC1967Proxy(\\n sharesSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(sharesSingleton).setUp.selector,\\n _name,\\n _symbol\\n )\\n )\\n );\\n if (!_transferableShares) {\\n IBaalToken(sharesToken).pause();\\n }\\n if (!_transferableLoot) {\\n IBaalToken(lootToken).pause();\\n }\\n\\n emit DeployBaalTokens(lootToken, sharesToken);\\n }\\n\\n function _authorizeUpgrade(\\n address newImplementation\\n ) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x006b6737392584aee27cae0cad838ca0d07004a77b10600884a3813318775807\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalSummoner.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalSummoner {\\n event AdminChanged(address previousAdmin, address newAdmin);\\n event BeaconUpgraded(address indexed beacon);\\n event DaoReferral(bytes32 referrer, address daoAddress);\\n event DeployBaalSafe(address baalSafe, address moduleAddr);\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n event Initialized(uint8 version);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event SetAddrsVersion(uint256 version);\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n event Upgraded(address indexed implementation);\\n\\n function setAddrs(\\n address _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) external;\\n\\n function initialize() external;\\n\\n function transferOwnership(address newOwner) external;\\n function upgradeTo(address newImplementation) external;\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\\n function renounceOwnership() external;\\n\\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\\n external\\n returns (address);\\n function summonBaalFromReferrer(\\n bytes memory initializationParams,\\n bytes[] memory initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address);\\n\\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\\n function deployTokens(string memory _name, string memory _symbol)\\n external\\n returns (address lootToken, address sharesToken);\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend);\\n function addrsVersion() external view returns (uint256);\\n function gnosisFallbackLibrary() external view returns (address);\\n function gnosisMultisendLibrary() external view returns (address);\\n function gnosisSingleton() external view returns (address);\\n function lootSingleton() external view returns (address);\\n function sharesSingleton() external view returns (address);\\n function owner() external view returns (address);\\n function proxiableUUID() external view returns (bytes32);\\n function template() external view returns (address);\\n}\\n\",\"keccak256\":\"0xc5eb34a9c49792956ed8574ce0fae742c3ea655101a890965caf7e7983e1be79\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b60805234801561001757600080fd5b50610020610025565b6100e5565b600054610100900460ff16156100915760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100e3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c6125de61011f600039600081816104ec01528181610538015281816105e10152818161062401526106c001526125de6000f3fe6080604052600436106200009d5760003560e01c8063715018a61162000060578063715018a6146200016b5780638129fc1c14620001835780638da5cb5b146200019b578063bb6decc814620001bb578063f2fde38b14620001e057600080fd5b806314b630f914620000a25780631f1bb0ef14620000e15780633659cfe614620001085780634f1ef286146200012d57806352d1902d1462000144575b600080fd5b348015620000af57600080fd5b5060c954620000c4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000ee57600080fd5b50620001066200010036600462001621565b62000205565b005b3480156200011557600080fd5b506200010662000127366004620015e1565b620004e1565b620001066200013e36600462001728565b620005d6565b3480156200015157600080fd5b506200015c620006b3565b604051908152602001620000d8565b3480156200017857600080fd5b506200010662000769565b3480156200019057600080fd5b506200010662000781565b348015620001a857600080fd5b506033546001600160a01b0316620000c4565b348015620001c857600080fd5b5062000106620001da366004620015e1565b620008a5565b348015620001ed57600080fd5b5062000106620001ff366004620015e1565b62000945565b600080620002148686620009c1565b91509150620002268888848462000d1e565b600060c960009054906101000a90046001600160a01b03166001600160a01b031663209f3695836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200028657600080fd5b505afa1580156200029b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002c59190810190620018ab565b846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002ff57600080fd5b505afa15801562000314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200033e9190810190620018ab565b8f8f8888604051602001620003599695949392919062001ba3565b60408051601f198184030181528282019091526012825271222420b23b2a37b5b2b729bab6b6b7b732b960711b602083015290889088908f906200039d9062001d69565b6040518663ffffffff1660e01b8152600401620003bf95949392919062001aa3565b602060405180830381600087803b158015620003da57600080fd5b505af1158015620003ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000415919062001601565b60405163f2fde38b60e01b81526001600160a01b0380831660048301529192509084169063f2fde38b90602401600060405180830381600087803b1580156200045d57600080fd5b505af115801562000472573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b158015620004ba57600080fd5b505af1158015620004cf573d6000803e3d6000fd5b50505050505050505050505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005365760405162461bcd60e51b81526004016200052d9062001c00565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200058160008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620005aa5760405162461bcd60e51b81526004016200052d9062001c4c565b620005b58162000f5f565b60408051600080825260208201909252620005d39183919062000f69565b50565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620006225760405162461bcd60e51b81526004016200052d9062001c00565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200066d60008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620006965760405162461bcd60e51b81526004016200052d9062001c4c565b620006a18262000f5f565b620006af8282600162000f69565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007555760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016200052d565b506000805160206200256283398151915290565b62000773620010f6565b6200077f600062001152565b565b600054610100900460ff1615808015620007a25750600054600160ff909116105b80620007be5750303b158015620007be575060005460ff166001145b620008235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200052d565b6000805460ff19166001179055801562000847576000805461ff0019166101001790555b62000851620011a4565b6200085b620011d8565b8015620005d3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b620008af620010f6565b6001600160a01b038116620008f65760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016200052d565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016200089a565b6200094f620010f6565b6001600160a01b038116620009b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200052d565b620005d38162001152565b600080808080808080620009d8898b018b62001922565b955095509550955095509550600060c960009054906101000a90046001600160a01b03166001600160a01b031663d9118ce76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a3557600080fd5b505afa15801562000a4a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a70919062001601565b9050600060c960009054906101000a90046001600160a01b03166001600160a01b031663a23466186040518163ffffffff1660e01b815260040160206040518083038186803b15801562000ac357600080fd5b505afa15801562000ad8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000afe919062001601565b90508163562d190d60e01b878760405160240162000b1e92919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b5d9062001497565b62000b6a92919062001a75565b604051809103906000f08015801562000b87573d6000803e3d6000fd5b5099508063562d190d60e01b898960405160240162000ba892919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000be79062001497565b62000bf492919062001a75565b604051809103906000f08015801562000c11573d6000803e3d6000fd5b5098508362000c7057886001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000c5657600080fd5b505af115801562000c6b573d6000803e3d6000fd5b505050505b8262000ccc57896001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000cb257600080fd5b505af115801562000cc7573d6000803e3d6000fd5b505050505b604080516001600160a01b03808d1682528b1660208201527ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a150505050505050509250929050565b6000808062000d308688018862001793565b9250925092508151835114801562000d49575080518351145b62000d875760405162461bcd60e51b815260206004820152600d60248201526c2161727261792070617269747960981b60448201526064016200052d565b60005b835181101562000f5557600082828151811062000dab5762000dab62001dea565b6020026020010151111562000e6a57856001600160a01b03166340c10f1985838151811062000dde5762000dde62001dea565b602002602001015184848151811062000dfb5762000dfb62001dea565b60200260200101516040518363ffffffff1660e01b815260040162000e359291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000e5057600080fd5b505af115801562000e65573d6000803e3d6000fd5b505050505b600083828151811062000e815762000e8162001dea565b6020026020010151111562000f4057846001600160a01b03166340c10f1985838151811062000eb45762000eb462001dea565b602002602001015185848151811062000ed15762000ed162001dea565b60200260200101516040518363ffffffff1660e01b815260040162000f0b9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000f2657600080fd5b505af115801562000f3b573d6000803e3d6000fd5b505050505b8062000f4c8162001dc0565b91505062000d8a565b5050505050505050565b620005d3620010f6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000fa45762000f9f8362001202565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000fde57600080fd5b505afa92505050801562001011575060408051601f3d908101601f191682019092526200100e9181019062001891565b60015b620010765760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016200052d565b600080516020620025628339815191528114620010e85760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016200052d565b5062000f9f838383620012a1565b6033546001600160a01b031633146200077f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200052d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620011ce5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f620012d2565b600054610100900460ff166200077f5760405162461bcd60e51b81526004016200052d9062001c98565b6001600160a01b0381163b620012715760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200052d565b6000805160206200256283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620012ac8362001307565b600082511180620012ba5750805b1562000f9f57620012cc838362001349565b50505050565b600054610100900460ff16620012fc5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f3362001152565b620013128162001202565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620013b35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200052d565b600080846001600160a01b031684604051620013d0919062001a57565b600060405180830381855af49150503d80600081146200140d576040519150601f19603f3d011682016040523d82523d6000602084013e62001412565b606091505b50915091506200143d8282604051806060016040528060278152602001620025826027913962001446565b95945050505050565b606083156200145757508162001463565b6200146383836200146a565b9392505050565b8151156200147b5781518083602001fd5b8060405162461bcd60e51b81526004016200052d919062001b65565b6107358062001e2d83390190565b6000620014bc620014b68462001d3e565b62001ce3565b9050828152838383011115620014d157600080fd5b828260208301376000602084830101529392505050565b600082601f830112620014fa57600080fd5b813560206200150d620014b68362001d17565b80838252828201915082860187848660051b89010111156200152e57600080fd5b60005b858110156200154f5781358452928401929084019060010162001531565b5090979650505050505050565b803580151581146200156d57600080fd5b919050565b60008083601f8401126200158557600080fd5b50813567ffffffffffffffff8111156200159e57600080fd5b602083019150836020828501011115620015b757600080fd5b9250929050565b600082601f830112620015d057600080fd5b6200146383833560208501620014a5565b600060208284031215620015f457600080fd5b8135620014638162001e16565b6000602082840312156200161457600080fd5b8151620014638162001e16565b600080600080600080600080600060c08a8c0312156200164057600080fd5b89356200164d8162001e16565b985060208a01356200165f8162001e16565b975060408a0135965060608a013567ffffffffffffffff808211156200168457600080fd5b620016928d838e0162001572565b909850965060808c0135915080821115620016ac57600080fd5b620016ba8d838e0162001572565b909650945060a08c0135915080821115620016d457600080fd5b818c0191508c601f830112620016e957600080fd5b813581811115620016f957600080fd5b8d60208260051b85010111156200170f57600080fd5b6020830194508093505050509295985092959850929598565b600080604083850312156200173c57600080fd5b8235620017498162001e16565b9150602083013567ffffffffffffffff8111156200176657600080fd5b8301601f810185136200177857600080fd5b6200178985823560208401620014a5565b9150509250929050565b600080600060608486031215620017a957600080fd5b833567ffffffffffffffff80821115620017c257600080fd5b818601915086601f830112620017d757600080fd5b81356020620017ea620014b68362001d17565b8083825282820191508286018b848660051b89010111156200180b57600080fd5b600096505b848710156200183b578035620018268162001e16565b83526001969096019591830191830162001810565b50975050870135925050808211156200185357600080fd5b6200186187838801620014e8565b935060408601359150808211156200187857600080fd5b506200188786828701620014e8565b9150509250925092565b600060208284031215620018a457600080fd5b5051919050565b600060208284031215620018be57600080fd5b815167ffffffffffffffff811115620018d657600080fd5b8201601f81018413620018e857600080fd5b8051620018f9620014b68262001d3e565b8181528560208385010111156200190f57600080fd5b6200143d82602083016020860162001d91565b60008060008060008060c087890312156200193c57600080fd5b863567ffffffffffffffff808211156200195557600080fd5b620019638a838b01620015be565b975060208901359150808211156200197a57600080fd5b620019888a838b01620015be565b965060408901359150808211156200199f57600080fd5b620019ad8a838b01620015be565b95506060890135915080821115620019c457600080fd5b50620019d389828a01620015be565b935050620019e4608088016200155c565b9150620019f460a088016200155c565b90509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845262001a4381602086016020860162001d91565b601f01601f19169290920160200192915050565b6000825162001a6b81846020870162001d91565b9190910192915050565b6001600160a01b038316815260406020820181905260009062001a9b9083018462001a29565b949350505050565b60808152600062001ab8608083018862001a29565b602083820381850152818783528183019050818860051b8401018960005b8a81101562001b4c57858303601f190184528135368d9003601e1901811262001afe57600080fd5b8c01803567ffffffffffffffff81111562001b1857600080fd5b8036038e131562001b2857600080fd5b62001b37858289850162001a00565b95870195945050509084019060010162001ad6565b5050604086019790975250505050606001529392505050565b60208152600062001463602083018462001a29565b60408152600062001b8f604083018562001a29565b82810360208401526200143d818562001a29565b60c08152600062001bb860c083018962001a29565b828103602084015262001bcc818962001a29565b6001600160a01b03978816604085015295871660608401525050918416608083015290921660a09092019190915292915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001d0f5762001d0f62001e00565b604052919050565b600067ffffffffffffffff82111562001d345762001d3462001e00565b5060051b60200190565b600067ffffffffffffffff82111562001d5b5762001d5b62001e00565b50601f01601f191660200190565b8051602080830151919081101562001d8b576000198160200360031b1b821691505b50919050565b60005b8381101562001dae57818101518382015260200162001d94565b83811115620012cc5750506000910152565b600060001982141562001de357634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620005d357600080fdfe6080604052604051610735380380610735833981016040819052610022916102dc565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103aa565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b815260040161014891906103c6565b600080604083850312156102ef57600080fd5b82516001600160a01b038116811461030657600080fd5b60208401519092506001600160401b038082111561032357600080fd5b818501915085601f83011261033757600080fd5b81518181111561034957610349610425565b604051601f8201601f19908116603f0116810190838211818310171561037157610371610425565b8160405282815288602084870101111561038a57600080fd5b61039b8360208301602088016103f9565b80955050505050509250929050565b600082516103bc8184602087016103f9565b9190910192915050565b60208152600082518060208401526103e58160408501602087016103f9565b601f01601f19169190910160400192915050565b60005b838110156104145781810151838201526020016103fc565b838111156100645750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e091906101e8565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610204565b600082516101fa818460208701610237565b9190910192915050565b6020815260008251806020840152610223816040850160208701610237565b601f01601f19169190910160400192915050565b60005b8381101561025257818101518382015260200161023a565b83811115610261576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122051cce14dd9337037379bd43ee81331c1b371dbeb3f61c2ba0ccdb3ad0e551a9664736f6c63430008070033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a5544699208b5bb7a4aa70d601b16889abe1fce4a7597621ea167622388a1aa64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106200009d5760003560e01c8063715018a61162000060578063715018a6146200016b5780638129fc1c14620001835780638da5cb5b146200019b578063bb6decc814620001bb578063f2fde38b14620001e057600080fd5b806314b630f914620000a25780631f1bb0ef14620000e15780633659cfe614620001085780634f1ef286146200012d57806352d1902d1462000144575b600080fd5b348015620000af57600080fd5b5060c954620000c4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000ee57600080fd5b50620001066200010036600462001621565b62000205565b005b3480156200011557600080fd5b506200010662000127366004620015e1565b620004e1565b620001066200013e36600462001728565b620005d6565b3480156200015157600080fd5b506200015c620006b3565b604051908152602001620000d8565b3480156200017857600080fd5b506200010662000769565b3480156200019057600080fd5b506200010662000781565b348015620001a857600080fd5b506033546001600160a01b0316620000c4565b348015620001c857600080fd5b5062000106620001da366004620015e1565b620008a5565b348015620001ed57600080fd5b5062000106620001ff366004620015e1565b62000945565b600080620002148686620009c1565b91509150620002268888848462000d1e565b600060c960009054906101000a90046001600160a01b03166001600160a01b031663209f3695836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200028657600080fd5b505afa1580156200029b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002c59190810190620018ab565b846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002ff57600080fd5b505afa15801562000314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200033e9190810190620018ab565b8f8f8888604051602001620003599695949392919062001ba3565b60408051601f198184030181528282019091526012825271222420b23b2a37b5b2b729bab6b6b7b732b960711b602083015290889088908f906200039d9062001d69565b6040518663ffffffff1660e01b8152600401620003bf95949392919062001aa3565b602060405180830381600087803b158015620003da57600080fd5b505af1158015620003ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000415919062001601565b60405163f2fde38b60e01b81526001600160a01b0380831660048301529192509084169063f2fde38b90602401600060405180830381600087803b1580156200045d57600080fd5b505af115801562000472573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b158015620004ba57600080fd5b505af1158015620004cf573d6000803e3d6000fd5b50505050505050505050505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005365760405162461bcd60e51b81526004016200052d9062001c00565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200058160008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620005aa5760405162461bcd60e51b81526004016200052d9062001c4c565b620005b58162000f5f565b60408051600080825260208201909252620005d39183919062000f69565b50565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620006225760405162461bcd60e51b81526004016200052d9062001c00565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200066d60008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620006965760405162461bcd60e51b81526004016200052d9062001c4c565b620006a18262000f5f565b620006af8282600162000f69565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007555760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016200052d565b506000805160206200256283398151915290565b62000773620010f6565b6200077f600062001152565b565b600054610100900460ff1615808015620007a25750600054600160ff909116105b80620007be5750303b158015620007be575060005460ff166001145b620008235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200052d565b6000805460ff19166001179055801562000847576000805461ff0019166101001790555b62000851620011a4565b6200085b620011d8565b8015620005d3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b620008af620010f6565b6001600160a01b038116620008f65760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016200052d565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016200089a565b6200094f620010f6565b6001600160a01b038116620009b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200052d565b620005d38162001152565b600080808080808080620009d8898b018b62001922565b955095509550955095509550600060c960009054906101000a90046001600160a01b03166001600160a01b031663d9118ce76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a3557600080fd5b505afa15801562000a4a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a70919062001601565b9050600060c960009054906101000a90046001600160a01b03166001600160a01b031663a23466186040518163ffffffff1660e01b815260040160206040518083038186803b15801562000ac357600080fd5b505afa15801562000ad8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000afe919062001601565b90508163562d190d60e01b878760405160240162000b1e92919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b5d9062001497565b62000b6a92919062001a75565b604051809103906000f08015801562000b87573d6000803e3d6000fd5b5099508063562d190d60e01b898960405160240162000ba892919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000be79062001497565b62000bf492919062001a75565b604051809103906000f08015801562000c11573d6000803e3d6000fd5b5098508362000c7057886001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000c5657600080fd5b505af115801562000c6b573d6000803e3d6000fd5b505050505b8262000ccc57896001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000cb257600080fd5b505af115801562000cc7573d6000803e3d6000fd5b505050505b604080516001600160a01b03808d1682528b1660208201527ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a150505050505050509250929050565b6000808062000d308688018862001793565b9250925092508151835114801562000d49575080518351145b62000d875760405162461bcd60e51b815260206004820152600d60248201526c2161727261792070617269747960981b60448201526064016200052d565b60005b835181101562000f5557600082828151811062000dab5762000dab62001dea565b6020026020010151111562000e6a57856001600160a01b03166340c10f1985838151811062000dde5762000dde62001dea565b602002602001015184848151811062000dfb5762000dfb62001dea565b60200260200101516040518363ffffffff1660e01b815260040162000e359291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000e5057600080fd5b505af115801562000e65573d6000803e3d6000fd5b505050505b600083828151811062000e815762000e8162001dea565b6020026020010151111562000f4057846001600160a01b03166340c10f1985838151811062000eb45762000eb462001dea565b602002602001015185848151811062000ed15762000ed162001dea565b60200260200101516040518363ffffffff1660e01b815260040162000f0b9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000f2657600080fd5b505af115801562000f3b573d6000803e3d6000fd5b505050505b8062000f4c8162001dc0565b91505062000d8a565b5050505050505050565b620005d3620010f6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000fa45762000f9f8362001202565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000fde57600080fd5b505afa92505050801562001011575060408051601f3d908101601f191682019092526200100e9181019062001891565b60015b620010765760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016200052d565b600080516020620025628339815191528114620010e85760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016200052d565b5062000f9f838383620012a1565b6033546001600160a01b031633146200077f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200052d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620011ce5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f620012d2565b600054610100900460ff166200077f5760405162461bcd60e51b81526004016200052d9062001c98565b6001600160a01b0381163b620012715760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200052d565b6000805160206200256283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620012ac8362001307565b600082511180620012ba5750805b1562000f9f57620012cc838362001349565b50505050565b600054610100900460ff16620012fc5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f3362001152565b620013128162001202565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620013b35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200052d565b600080846001600160a01b031684604051620013d0919062001a57565b600060405180830381855af49150503d80600081146200140d576040519150601f19603f3d011682016040523d82523d6000602084013e62001412565b606091505b50915091506200143d8282604051806060016040528060278152602001620025826027913962001446565b95945050505050565b606083156200145757508162001463565b6200146383836200146a565b9392505050565b8151156200147b5781518083602001fd5b8060405162461bcd60e51b81526004016200052d919062001b65565b6107358062001e2d83390190565b6000620014bc620014b68462001d3e565b62001ce3565b9050828152838383011115620014d157600080fd5b828260208301376000602084830101529392505050565b600082601f830112620014fa57600080fd5b813560206200150d620014b68362001d17565b80838252828201915082860187848660051b89010111156200152e57600080fd5b60005b858110156200154f5781358452928401929084019060010162001531565b5090979650505050505050565b803580151581146200156d57600080fd5b919050565b60008083601f8401126200158557600080fd5b50813567ffffffffffffffff8111156200159e57600080fd5b602083019150836020828501011115620015b757600080fd5b9250929050565b600082601f830112620015d057600080fd5b6200146383833560208501620014a5565b600060208284031215620015f457600080fd5b8135620014638162001e16565b6000602082840312156200161457600080fd5b8151620014638162001e16565b600080600080600080600080600060c08a8c0312156200164057600080fd5b89356200164d8162001e16565b985060208a01356200165f8162001e16565b975060408a0135965060608a013567ffffffffffffffff808211156200168457600080fd5b620016928d838e0162001572565b909850965060808c0135915080821115620016ac57600080fd5b620016ba8d838e0162001572565b909650945060a08c0135915080821115620016d457600080fd5b818c0191508c601f830112620016e957600080fd5b813581811115620016f957600080fd5b8d60208260051b85010111156200170f57600080fd5b6020830194508093505050509295985092959850929598565b600080604083850312156200173c57600080fd5b8235620017498162001e16565b9150602083013567ffffffffffffffff8111156200176657600080fd5b8301601f810185136200177857600080fd5b6200178985823560208401620014a5565b9150509250929050565b600080600060608486031215620017a957600080fd5b833567ffffffffffffffff80821115620017c257600080fd5b818601915086601f830112620017d757600080fd5b81356020620017ea620014b68362001d17565b8083825282820191508286018b848660051b89010111156200180b57600080fd5b600096505b848710156200183b578035620018268162001e16565b83526001969096019591830191830162001810565b50975050870135925050808211156200185357600080fd5b6200186187838801620014e8565b935060408601359150808211156200187857600080fd5b506200188786828701620014e8565b9150509250925092565b600060208284031215620018a457600080fd5b5051919050565b600060208284031215620018be57600080fd5b815167ffffffffffffffff811115620018d657600080fd5b8201601f81018413620018e857600080fd5b8051620018f9620014b68262001d3e565b8181528560208385010111156200190f57600080fd5b6200143d82602083016020860162001d91565b60008060008060008060c087890312156200193c57600080fd5b863567ffffffffffffffff808211156200195557600080fd5b620019638a838b01620015be565b975060208901359150808211156200197a57600080fd5b620019888a838b01620015be565b965060408901359150808211156200199f57600080fd5b620019ad8a838b01620015be565b95506060890135915080821115620019c457600080fd5b50620019d389828a01620015be565b935050620019e4608088016200155c565b9150620019f460a088016200155c565b90509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845262001a4381602086016020860162001d91565b601f01601f19169290920160200192915050565b6000825162001a6b81846020870162001d91565b9190910192915050565b6001600160a01b038316815260406020820181905260009062001a9b9083018462001a29565b949350505050565b60808152600062001ab8608083018862001a29565b602083820381850152818783528183019050818860051b8401018960005b8a81101562001b4c57858303601f190184528135368d9003601e1901811262001afe57600080fd5b8c01803567ffffffffffffffff81111562001b1857600080fd5b8036038e131562001b2857600080fd5b62001b37858289850162001a00565b95870195945050509084019060010162001ad6565b5050604086019790975250505050606001529392505050565b60208152600062001463602083018462001a29565b60408152600062001b8f604083018562001a29565b82810360208401526200143d818562001a29565b60c08152600062001bb860c083018962001a29565b828103602084015262001bcc818962001a29565b6001600160a01b03978816604085015295871660608401525050918416608083015290921660a09092019190915292915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001d0f5762001d0f62001e00565b604052919050565b600067ffffffffffffffff82111562001d345762001d3462001e00565b5060051b60200190565b600067ffffffffffffffff82111562001d5b5762001d5b62001e00565b50601f01601f191660200190565b8051602080830151919081101562001d8b576000198160200360031b1b821691505b50919050565b60005b8381101562001dae57818101518382015260200162001d94565b83811115620012cc5750506000910152565b600060001982141562001de357634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620005d357600080fdfe6080604052604051610735380380610735833981016040819052610022916102dc565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103aa565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b815260040161014891906103c6565b600080604083850312156102ef57600080fd5b82516001600160a01b038116811461030657600080fd5b60208401519092506001600160401b038082111561032357600080fd5b818501915085601f83011261033757600080fd5b81518181111561034957610349610425565b604051601f8201601f19908116603f0116810190838211818310171561037157610371610425565b8160405282815288602084870101111561038a57600080fd5b61039b8360208301602088016103f9565b80955050505050509250929050565b600082516103bc8184602087016103f9565b9190910192915050565b60208152600082518060208401526103e58160408501602087016103f9565b601f01601f19169190910160400192915050565b60005b838110156104145781810151838201526020016103fc565b838111156100645750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e091906101e8565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610204565b600082516101fa818460208701610237565b9190910192915050565b6020815260008251806020840152610223816040850160208701610237565b601f01601f19169190910160400192915050565b60005b8381101561025257818101518382015260200161023a565b83811115610261576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122051cce14dd9337037379bd43ee81331c1b371dbeb3f61c2ba0ccdb3ad0e551a9664736f6c63430008070033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a5544699208b5bb7a4aa70d601b16889abe1fce4a7597621ea167622388a1aa64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setSummonerAddr(address)": { + "details": "Sets the address of the BaalSummoner contract", + "params": { + "baalSummoner": "The address of the BaalSummoner contract" + } + }, + "summonBaalFromReferrer(address,address,uint256,bytes,bytes,bytes[])": { + "details": "Summon a new Baal contract with a new set of tokens", + "params": { + "_forwarderAddr": "The address of the forwarder to be used, 0x0 if not set", + "_safeAddr": "The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe", + "_saltNonce": "The salt nonce to be used for the Safe contract", + "initializationMintParams": "The parameters for minting the tokens", + "initializationTokenParams": "The parameters for deploying the tokens", + "postInitializationActions": "The actions to be performed after the initialization" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13087, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_baalSummoner", + "offset": 0, + "slot": "201", + "type": "t_contract(IBaalSummoner)14323" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IBaalSummoner)14323": { + "encoding": "inplace", + "label": "contract IBaalSummoner", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/BaalAdvTokenSummoner_Proxy.json b/deployments/base/BaalAdvTokenSummoner_Proxy.json new file mode 100644 index 0000000..edf2cde --- /dev/null +++ b/deployments/base/BaalAdvTokenSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "transactionIndex": 5, + "gasUsed": "333334", + "logsBloom": "0x00000000000000000000000000000000400000000000200000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000500000000000000000000000000000000000004000a00080000000000000000400000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000020000000200000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f", + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d69e5b8f6fa0e5d94b93848700655a78df24e387" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + }, + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + }, + { + "transactionIndex": 5, + "blockNumber": 7428979, + "transactionHash": "0x1814134e85ab94ac9e6c605a36c97c314fc525e89d807ceb4fcf825010e785d7", + "address": "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 8, + "blockHash": "0xa383616aa7df3547d94adf01e5b8e1c8307966b7c2ed1aa196253247038a169f" + } + ], + "blockNumber": 7428979, + "cumulativeGasUsed": "695117", + "status": 1, + "byzantium": true + }, + "args": [ + "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/BaalAndVaultSummoner.json b/deployments/base/BaalAndVaultSummoner.json new file mode 100644 index 0000000..ab84b5b --- /dev/null +++ b/deployments/base/BaalAndVaultSummoner.json @@ -0,0 +1,593 @@ +{ + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct BaalAndVaultSummoner.Vault", + "name": "vault", + "type": "tuple" + } + ], + "name": "SetVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "deactivateVaultAsDao", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setNewVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonBaalAndVault", + "outputs": [ + { + "internalType": "address", + "name": "_daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonVault", + "outputs": [ + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [], + "name": "vaultIdx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "vaults", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "transactionIndex": 1, + "gasUsed": "335553", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000010000000000400010000000000000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000008000000000000000000000000020000004000000000000040000000000000000000000000000000020000000200000008000000000000000000000000000000000000000000000000000", + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3", + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000763f5c2e59f997a6cc48bf1228abf61325244702" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + }, + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + }, + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + } + ], + "blockNumber": 7428951, + "cumulativeGasUsed": "399566", + "status": 1, + "byzantium": true + }, + "args": [ + "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/BaalAndVaultSummoner_Implementation.json b/deployments/base/BaalAndVaultSummoner_Implementation.json new file mode 100644 index 0000000..e9e2666 --- /dev/null +++ b/deployments/base/BaalAndVaultSummoner_Implementation.json @@ -0,0 +1,747 @@ +{ + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct BaalAndVaultSummoner.Vault", + "name": "vault", + "type": "tuple" + } + ], + "name": "SetVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "deactivateVaultAsDao", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setNewVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonBaalAndVault", + "outputs": [ + { + "internalType": "address", + "name": "_daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonVault", + "outputs": [ + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [], + "name": "vaultIdx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "vaults", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2cce33aadf476374be498982568b514bf7048dce9222be3b2b0c7135ac6f359c", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "transactionIndex": 1, + "gasUsed": "1561244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x87c94a70ac75a14f4a19bfd4b8ea85c296db428077e109c9ed21ab4c4af66291", + "transactionHash": "0x2cce33aadf476374be498982568b514bf7048dce9222be3b2b0c7135ac6f359c", + "logs": [], + "blockNumber": 7428948, + "cumulativeGasUsed": "1608157", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"SetDelegate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"struct BaalAndVaultSummoner.Vault\",\"name\":\"vault\",\"type\":\"tuple\"}],\"name\":\"SetVault\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"summoner\",\"type\":\"address\"}],\"name\":\"setSummoner\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_baalSummoner\",\"outputs\":[{\"internalType\":\"contract IBaalSummoner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"}],\"name\":\"deactivateVaultAsDao\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"setDelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setNewVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baalSummoner\",\"type\":\"address\"}],\"name\":\"setSummonerAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"setVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"summonBaalAndVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vaultAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"summonVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_vaultAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[],\"name\":\"vaultIdx\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vaults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deactivateVaultAsDao(uint256,address)\":{\"notice\":\"A DAO can set a Vault as inactive \"},\"setDelegate(address,address)\":{\"notice\":\"Allow a Dao to set a delegate that can manage vault enteries \"},\"setNewVault(address,address,string)\":{\"notice\":\"set a new Vault as active on existing dao (owner only) \"},\"setVault(uint256,bool)\":{\"notice\":\"set a Vault as active or not on existing dao (owner only) \"},\"summonBaalAndVault(bytes,bytes[],uint256,bytes32,string)\":{\"notice\":\"Summon a new baal and add a Vault \"},\"summonVault(address,string)\":{\"notice\":\"create and add a Vault(Safe) to an existing DAO \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/higherOrderFactories/BaalAndVaultSummoner.sol\":\"BaalAndVaultSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"contracts/higherOrderFactories/BaalAndVaultSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"../interfaces/IBaalSummoner.sol\\\";\\n\\n/*\\nSummon new 'non-ragequitable' treasury Safe (Vaults). (sidecar?)\\nCan summon a dao with a new Vault.\\nCan summon a new vault for a dao after initial dao setup.\\nActs as a register and the owner of the contract or DAO can deactivate\\nregister is primarily a helper for UIs\\nOwner of the contract can add new vaults, and set current vaults\\nContract is upgradable and should be owned by a DAO\\n*/\\ncontract BaalAndVaultSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\\n\\n IBaalSummoner public _baalSummoner;\\n uint256 public vaultIdx;\\n\\n struct Vault{\\n uint256 id;\\n bool active;\\n address daoAddress;\\n address vaultAddress;\\n string name;\\n }\\n mapping(uint256 => Vault) public vaults;\\n mapping(address => address) public delegates;\\n\\n event SetVault(\\n Vault vault\\n );\\n\\n event SetDelegate(\\n address daoAddress,\\n address delegate\\n );\\n\\n event setSummoner(\\n address summoner\\n );\\n\\n function initialize() initializer public {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n vaultIdx = 0;\\n }\\n\\n function setSummonerAddr(\\n address baalSummoner\\n ) public onlyOwner {\\n require(baalSummoner != address(0), \\\"zero address\\\");\\n _baalSummoner = IBaalSummoner(baalSummoner);\\n emit setSummoner(baalSummoner);\\n }\\n\\n /** Summon a new baal and add a Vault */\\n function summonBaalAndVault(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 saltNonce,\\n bytes32 referrer,\\n string memory name\\n ) external returns (address _daoAddress, address _vaultAddress) {\\n _daoAddress = _baalSummoner.summonBaalFromReferrer(\\n initializationParams,\\n initializationActions,\\n saltNonce,\\n referrer\\n );\\n _vaultAddress = summonVault(_daoAddress, name);\\n }\\n\\n /** create and add a Vault(Safe) to an existing DAO */\\n function summonVault(\\n address daoAddress,\\n string memory name\\n ) public returns (address _vaultAddress) {\\n _vaultAddress = _baalSummoner.deployAndSetupSafe(\\n daoAddress\\n );\\n _setNewVault(name, daoAddress, _vaultAddress);\\n }\\n\\n /** set a Vault as active or not on existing dao (owner only) */\\n // Admin functions to help maintain the registry.\\n function setVault(\\n uint256 id,\\n bool active\\n ) public onlyOwner\\n {\\n _setVault(id, active);\\n }\\n\\n /** set a new Vault as active on existing dao (owner only) */\\n // Admin functions to help maintain the registry.\\n function setNewVault(\\n address daoAddress, \\n address vaultAddress,\\n string memory name\\n ) public onlyOwner\\n {\\n _setNewVault(name, daoAddress, vaultAddress);\\n }\\n\\n /** \\n A DAO can set a Vault as inactive \\n */\\n function deactivateVaultAsDao(\\n uint256 id,\\n address daoAddress\\n ) external\\n {\\n require(msg.sender == daoAddress || msg.sender == delegates[daoAddress], \\\"not DAO or delegate\\\");\\n require(vaults[id].daoAddress == daoAddress && vaults[id].active,\\\"!not active DAO vault\\\");\\n _setVault(id, false);\\n }\\n\\n /** Allow a Dao to set a delegate that can manage vault enteries */\\n function setDelegate(\\n address daoAddress,\\n address delegate\\n ) external\\n {\\n require(msg.sender == daoAddress, \\\"!DAO\\\");\\n delegates[daoAddress] = delegate;\\n emit SetDelegate(daoAddress, delegate);\\n }\\n\\n\\n function _setVault(\\n uint256 id, \\n bool active\\n ) internal \\n {\\n vaults[id].active = active;\\n emit SetVault(vaults[id]);\\n }\\n\\n function _setNewVault(\\n string memory name,\\n address daoAddress, \\n address vaultAddress\\n ) internal \\n {\\n vaultIdx += 1;\\n vaults[vaultIdx] = Vault(vaultIdx, true, daoAddress, vaultAddress, name);\\n emit SetVault(vaults[vaultIdx]);\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n onlyOwner\\n override\\n {}\\n}\\n\",\"keccak256\":\"0x5519dacfb28e1a8ec59e4653d8d85f18a2ecf32a9ec00627d4575c94c2c27553\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalSummoner.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalSummoner {\\n event AdminChanged(address previousAdmin, address newAdmin);\\n event BeaconUpgraded(address indexed beacon);\\n event DaoReferral(bytes32 referrer, address daoAddress);\\n event DeployBaalSafe(address baalSafe, address moduleAddr);\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n event Initialized(uint8 version);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event SetAddrsVersion(uint256 version);\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n event Upgraded(address indexed implementation);\\n\\n function setAddrs(\\n address _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) external;\\n\\n function initialize() external;\\n\\n function transferOwnership(address newOwner) external;\\n function upgradeTo(address newImplementation) external;\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\\n function renounceOwnership() external;\\n\\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\\n external\\n returns (address);\\n function summonBaalFromReferrer(\\n bytes memory initializationParams,\\n bytes[] memory initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address);\\n\\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\\n function deployTokens(string memory _name, string memory _symbol)\\n external\\n returns (address lootToken, address sharesToken);\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend);\\n function addrsVersion() external view returns (uint256);\\n function gnosisFallbackLibrary() external view returns (address);\\n function gnosisMultisendLibrary() external view returns (address);\\n function gnosisSingleton() external view returns (address);\\n function lootSingleton() external view returns (address);\\n function sharesSingleton() external view returns (address);\\n function owner() external view returns (address);\\n function proxiableUUID() external view returns (bytes32);\\n function template() external view returns (address);\\n}\\n\",\"keccak256\":\"0xc5eb34a9c49792956ed8574ce0fae742c3ea655101a890965caf7e7983e1be79\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b60805234801561001757600080fd5b5060805160601c611b4c6100526000396000818161049f015281816104df0152818161057f015281816105bf015261064e0152611b4c6000f3fe6080604052600436106101095760003560e01c80638129fc1c11610095578063ac06a9a911610064578063ac06a9a9146102f2578063b395f08614610312578063bb6decc814610332578063bedfb8d414610352578063f2fde38b1461036857600080fd5b80638129fc1c1461024e5780638c64ea4a146102635780638da5cb5b14610294578063a156d863146102b257600080fd5b806352d1902d116100dc57806352d1902d146101a0578063587cde1e146101c35780635c873849146101f9578063619dd5d414610219578063715018a61461023957600080fd5b8063133afcc01461010e57806314b630f9146101305780633659cfe61461016d5780634f1ef2861461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611678565b610388565b005b34801561013c57600080fd5b5060c954610150906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017957600080fd5b5061012e6101883660046113f5565b610494565b61012e61019b3660046114ca565b610574565b3480156101ac57600080fd5b506101b5610641565b604051908152602001610164565b3480156101cf57600080fd5b506101506101de3660046113f5565b60cc602052600090815260409020546001600160a01b031681565b34801561020557600080fd5b5061012e61021436600461142f565b6106f4565b34801561022557600080fd5b5061012e61023436600461169d565b6107a1565b34801561024557600080fd5b5061012e6107b3565b34801561025a57600080fd5b5061012e6107c7565b34801561026f57600080fd5b5061028361027e36600461165f565b6108e5565b6040516101649594939291906119d2565b3480156102a057600080fd5b506033546001600160a01b0316610150565b3480156102be57600080fd5b506102d26102cd36600461158d565b6109b0565b604080516001600160a01b03938416815292909116602083015201610164565b3480156102fe57600080fd5b5061015061030d36600461152e565b610a5b565b34801561031e57600080fd5b5061012e61032d366004611468565b610aee565b34801561033e57600080fd5b5061012e61034d3660046113f5565b610b06565b34801561035e57600080fd5b506101b560ca5481565b34801561037457600080fd5b5061012e6103833660046113f5565b610ba1565b336001600160a01b03821614806103b857506001600160a01b03818116600090815260cc60205260409020541633145b6103ff5760405162461bcd60e51b81526020600482015260136024820152726e6f742044414f206f722064656c656761746560681b60448201526064015b60405180910390fd5b600082815260cb60205260409020600101546001600160a01b03828116610100909204161480156104415750600082815260cb602052604090206001015460ff165b6104855760405162461bcd60e51b8152602060048201526015602482015274085b9bdd081858dd1a5d9948111053c81d985d5b1d605a1b60448201526064016103f6565b610490826000610c17565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156104dd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610526600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461054c5760405162461bcd60e51b81526004016103f690611852565b61055581610c64565b6040805160008082526020820190925261057191839190610c6c565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105bd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610606600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461062c5760405162461bcd60e51b81526004016103f690611852565b61063582610c64565b61049082826001610c6c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106e15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016103f6565b50600080516020611ad083398151915290565b336001600160a01b038316146107355760405162461bcd60e51b81526004016103f6906020808252600490820152632144414f60e01b604082015260600190565b6001600160a01b03828116600081815260cc602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91015b60405180910390a15050565b6107a9610de6565b6104908282610c17565b6107bb610de6565b6107c56000610e40565b565b600054610100900460ff16158080156107e75750600054600160ff909116105b806108015750303b158015610801575060005460ff166001145b6108645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103f6565b6000805460ff191660011790558015610887576000805461ff0019166101001790555b61088f610e92565b610897610ec1565b600060ca558015610571576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b60cb602052600090815260409020805460018201546002830154600384018054939460ff8416946101009094046001600160a01b039081169493169290919061092d90611a69565b80601f016020809104026020016040519081016040528092919081815260200182805461095990611a69565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b5050505050905085565b60c95460405163209f369560e01b815260009182916001600160a01b039091169063209f3695906109ef908c908c908c908c908c908c90600401611738565b602060405180830381600087803b158015610a0957600080fd5b505af1158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a419190611412565b9150610a4d8284610a5b565b905097509795505050505050565b60c954604051633e2108c760e21b81526001600160a01b038481166004830152600092169063f884231c90602401602060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190611412565b9050610ae8828483610ee8565b92915050565b610af6610de6565b610b01818484610ee8565b505050565b610b0e610de6565b6001600160a01b038116610b535760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016103f6565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016108da565b610ba9610de6565b6001600160a01b038116610c0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b61057181610e40565b600082815260cb60205260409081902060018101805460ff191684151517905590517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f7891610795916118e9565b610571610de6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c9f57610b0183611005565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd857600080fd5b505afa925050508015610d08575060408051601f3d908101601f19168201909252610d0591810190611574565b60015b610d6b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016103f6565b600080516020611ad08339815191528114610dda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016103f6565b50610b018383836110a1565b6033546001600160a01b031633146107c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610eb95760405162461bcd60e51b81526004016103f69061189e565b6107c56110cc565b600054610100900460ff166107c55760405162461bcd60e51b81526004016103f69061189e565b600160ca6000828254610efb9190611a17565b90915550506040805160a08101825260ca54808252600160208084018281526001600160a01b0388811686880190815288821660608801908152608088018c8152600097885260cb865298909620875181559251948301805491516001600160a81b0319909216951515610100600160a81b03191695909517610100918316919091021790935592516002840180546001600160a01b03191691909316179091559251805192939192610fb4926003850192019061127a565b505060ca54600090815260cb60205260409081902090517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f789250610ff891906118e9565b60405180910390a1505050565b6001600160a01b0381163b6110725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016103f6565b600080516020611ad083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6110aa836110fc565b6000825111806110b75750805b15610b01576110c6838361113c565b50505050565b600054610100900460ff166110f35760405162461bcd60e51b81526004016103f69061189e565b6107c533610e40565b61110581611005565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6111a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016103f6565b600080846001600160a01b0316846040516111bf919061171c565b600060405180830381855af49150503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b50915091506112278282604051806060016040528060278152602001611af060279139611230565b95945050505050565b6060831561123f575081611249565b6112498383611250565b9392505050565b8151156112605781518083602001fd5b8060405162461bcd60e51b81526004016103f691906117f3565b82805461128690611a69565b90600052602060002090601f0160209004810192826112a857600085556112ee565b82601f106112c157805160ff19168380011785556112ee565b828001600101855582156112ee579182015b828111156112ee5782518255916020019190600101906112d3565b506112fa9291506112fe565b5090565b5b808211156112fa57600081556001016112ff565b600067ffffffffffffffff8084111561132e5761132e611aa4565b604051601f8501601f19908116603f0116810190828211818310171561135657611356611aa4565b8160405280935085815286868601111561136f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f84011261139b57600080fd5b50813567ffffffffffffffff8111156113b357600080fd5b6020830191508360208260051b85010111156113ce57600080fd5b9250929050565b600082601f8301126113e657600080fd5b61124983833560208501611313565b60006020828403121561140757600080fd5b813561124981611aba565b60006020828403121561142457600080fd5b815161124981611aba565b6000806040838503121561144257600080fd5b823561144d81611aba565b9150602083013561145d81611aba565b809150509250929050565b60008060006060848603121561147d57600080fd5b833561148881611aba565b9250602084013561149881611aba565b9150604084013567ffffffffffffffff8111156114b457600080fd5b6114c0868287016113d5565b9150509250925092565b600080604083850312156114dd57600080fd5b82356114e881611aba565b9150602083013567ffffffffffffffff81111561150457600080fd5b8301601f8101851361151557600080fd5b61152485823560208401611313565b9150509250929050565b6000806040838503121561154157600080fd5b823561154c81611aba565b9150602083013567ffffffffffffffff81111561156857600080fd5b611524858286016113d5565b60006020828403121561158657600080fd5b5051919050565b600080600080600080600060a0888a0312156115a857600080fd5b873567ffffffffffffffff808211156115c057600080fd5b818a0191508a601f8301126115d457600080fd5b8135818111156115e357600080fd5b8b60208285010111156115f557600080fd5b60209283019950975090890135908082111561161057600080fd5b61161c8b838c01611389565b909750955060408a0135945060608a0135935060808a013591508082111561164357600080fd5b506116508a828b016113d5565b91505092959891949750929550565b60006020828403121561167157600080fd5b5035919050565b6000806040838503121561168b57600080fd5b82359150602083013561145d81611aba565b600080604083850312156116b057600080fd5b823591506020830135801515811461145d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452611708816020860160208601611a3d565b601f01601f19169290920160200192915050565b6000825161172e818460208701611a3d565b9190910192915050565b60808152600061174c60808301888a6116c7565b602083820381850152818783528183019050818860051b8401018960005b8a8110156117d957858303601f190184528135368d9003601e1901811261179057600080fd5b8c01803567ffffffffffffffff8111156117a957600080fd5b8036038e13156117b857600080fd5b6117c585828985016116c7565b95870195945050509084019060010161176a565b505060408601979097525050505060600152949350505050565b60208152600061124960208301846116f0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825282548282015260018084015460ff81161515604085015260081c6001600160a01b039081166060850152600285015416608084015260a080840152600384018054600093929190849080841c8185168061194957607f821691505b86821081141561196757634e487b7160e01b84526022600452602484fd5b60c0890182905260e089018180156119865760018114611997576119c2565b60ff198516825288820195506119c2565b60008781526020902060005b858110156119bc57815484820152908901908a016119a3565b83019650505b50939a9950505050505050505050565b85815284151560208201526001600160a01b0384811660408301528316606082015260a060808201819052600090611a0c908301846116f0565b979650505050505050565b60008219821115611a3857634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015611a58578181015183820152602001611a40565b838111156110c65750506000910152565b600181811c90821680611a7d57607f821691505b60208210811415611a9e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461057157600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a147e58c05b20357cb3919a570b985d63b405a5c57197b71f94854fda882a9a64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c80638129fc1c11610095578063ac06a9a911610064578063ac06a9a9146102f2578063b395f08614610312578063bb6decc814610332578063bedfb8d414610352578063f2fde38b1461036857600080fd5b80638129fc1c1461024e5780638c64ea4a146102635780638da5cb5b14610294578063a156d863146102b257600080fd5b806352d1902d116100dc57806352d1902d146101a0578063587cde1e146101c35780635c873849146101f9578063619dd5d414610219578063715018a61461023957600080fd5b8063133afcc01461010e57806314b630f9146101305780633659cfe61461016d5780634f1ef2861461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611678565b610388565b005b34801561013c57600080fd5b5060c954610150906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017957600080fd5b5061012e6101883660046113f5565b610494565b61012e61019b3660046114ca565b610574565b3480156101ac57600080fd5b506101b5610641565b604051908152602001610164565b3480156101cf57600080fd5b506101506101de3660046113f5565b60cc602052600090815260409020546001600160a01b031681565b34801561020557600080fd5b5061012e61021436600461142f565b6106f4565b34801561022557600080fd5b5061012e61023436600461169d565b6107a1565b34801561024557600080fd5b5061012e6107b3565b34801561025a57600080fd5b5061012e6107c7565b34801561026f57600080fd5b5061028361027e36600461165f565b6108e5565b6040516101649594939291906119d2565b3480156102a057600080fd5b506033546001600160a01b0316610150565b3480156102be57600080fd5b506102d26102cd36600461158d565b6109b0565b604080516001600160a01b03938416815292909116602083015201610164565b3480156102fe57600080fd5b5061015061030d36600461152e565b610a5b565b34801561031e57600080fd5b5061012e61032d366004611468565b610aee565b34801561033e57600080fd5b5061012e61034d3660046113f5565b610b06565b34801561035e57600080fd5b506101b560ca5481565b34801561037457600080fd5b5061012e6103833660046113f5565b610ba1565b336001600160a01b03821614806103b857506001600160a01b03818116600090815260cc60205260409020541633145b6103ff5760405162461bcd60e51b81526020600482015260136024820152726e6f742044414f206f722064656c656761746560681b60448201526064015b60405180910390fd5b600082815260cb60205260409020600101546001600160a01b03828116610100909204161480156104415750600082815260cb602052604090206001015460ff165b6104855760405162461bcd60e51b8152602060048201526015602482015274085b9bdd081858dd1a5d9948111053c81d985d5b1d605a1b60448201526064016103f6565b610490826000610c17565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156104dd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610526600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461054c5760405162461bcd60e51b81526004016103f690611852565b61055581610c64565b6040805160008082526020820190925261057191839190610c6c565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105bd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610606600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461062c5760405162461bcd60e51b81526004016103f690611852565b61063582610c64565b61049082826001610c6c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106e15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016103f6565b50600080516020611ad083398151915290565b336001600160a01b038316146107355760405162461bcd60e51b81526004016103f6906020808252600490820152632144414f60e01b604082015260600190565b6001600160a01b03828116600081815260cc602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91015b60405180910390a15050565b6107a9610de6565b6104908282610c17565b6107bb610de6565b6107c56000610e40565b565b600054610100900460ff16158080156107e75750600054600160ff909116105b806108015750303b158015610801575060005460ff166001145b6108645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103f6565b6000805460ff191660011790558015610887576000805461ff0019166101001790555b61088f610e92565b610897610ec1565b600060ca558015610571576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b60cb602052600090815260409020805460018201546002830154600384018054939460ff8416946101009094046001600160a01b039081169493169290919061092d90611a69565b80601f016020809104026020016040519081016040528092919081815260200182805461095990611a69565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b5050505050905085565b60c95460405163209f369560e01b815260009182916001600160a01b039091169063209f3695906109ef908c908c908c908c908c908c90600401611738565b602060405180830381600087803b158015610a0957600080fd5b505af1158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a419190611412565b9150610a4d8284610a5b565b905097509795505050505050565b60c954604051633e2108c760e21b81526001600160a01b038481166004830152600092169063f884231c90602401602060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190611412565b9050610ae8828483610ee8565b92915050565b610af6610de6565b610b01818484610ee8565b505050565b610b0e610de6565b6001600160a01b038116610b535760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016103f6565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016108da565b610ba9610de6565b6001600160a01b038116610c0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b61057181610e40565b600082815260cb60205260409081902060018101805460ff191684151517905590517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f7891610795916118e9565b610571610de6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c9f57610b0183611005565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd857600080fd5b505afa925050508015610d08575060408051601f3d908101601f19168201909252610d0591810190611574565b60015b610d6b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016103f6565b600080516020611ad08339815191528114610dda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016103f6565b50610b018383836110a1565b6033546001600160a01b031633146107c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610eb95760405162461bcd60e51b81526004016103f69061189e565b6107c56110cc565b600054610100900460ff166107c55760405162461bcd60e51b81526004016103f69061189e565b600160ca6000828254610efb9190611a17565b90915550506040805160a08101825260ca54808252600160208084018281526001600160a01b0388811686880190815288821660608801908152608088018c8152600097885260cb865298909620875181559251948301805491516001600160a81b0319909216951515610100600160a81b03191695909517610100918316919091021790935592516002840180546001600160a01b03191691909316179091559251805192939192610fb4926003850192019061127a565b505060ca54600090815260cb60205260409081902090517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f789250610ff891906118e9565b60405180910390a1505050565b6001600160a01b0381163b6110725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016103f6565b600080516020611ad083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6110aa836110fc565b6000825111806110b75750805b15610b01576110c6838361113c565b50505050565b600054610100900460ff166110f35760405162461bcd60e51b81526004016103f69061189e565b6107c533610e40565b61110581611005565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6111a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016103f6565b600080846001600160a01b0316846040516111bf919061171c565b600060405180830381855af49150503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b50915091506112278282604051806060016040528060278152602001611af060279139611230565b95945050505050565b6060831561123f575081611249565b6112498383611250565b9392505050565b8151156112605781518083602001fd5b8060405162461bcd60e51b81526004016103f691906117f3565b82805461128690611a69565b90600052602060002090601f0160209004810192826112a857600085556112ee565b82601f106112c157805160ff19168380011785556112ee565b828001600101855582156112ee579182015b828111156112ee5782518255916020019190600101906112d3565b506112fa9291506112fe565b5090565b5b808211156112fa57600081556001016112ff565b600067ffffffffffffffff8084111561132e5761132e611aa4565b604051601f8501601f19908116603f0116810190828211818310171561135657611356611aa4565b8160405280935085815286868601111561136f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f84011261139b57600080fd5b50813567ffffffffffffffff8111156113b357600080fd5b6020830191508360208260051b85010111156113ce57600080fd5b9250929050565b600082601f8301126113e657600080fd5b61124983833560208501611313565b60006020828403121561140757600080fd5b813561124981611aba565b60006020828403121561142457600080fd5b815161124981611aba565b6000806040838503121561144257600080fd5b823561144d81611aba565b9150602083013561145d81611aba565b809150509250929050565b60008060006060848603121561147d57600080fd5b833561148881611aba565b9250602084013561149881611aba565b9150604084013567ffffffffffffffff8111156114b457600080fd5b6114c0868287016113d5565b9150509250925092565b600080604083850312156114dd57600080fd5b82356114e881611aba565b9150602083013567ffffffffffffffff81111561150457600080fd5b8301601f8101851361151557600080fd5b61152485823560208401611313565b9150509250929050565b6000806040838503121561154157600080fd5b823561154c81611aba565b9150602083013567ffffffffffffffff81111561156857600080fd5b611524858286016113d5565b60006020828403121561158657600080fd5b5051919050565b600080600080600080600060a0888a0312156115a857600080fd5b873567ffffffffffffffff808211156115c057600080fd5b818a0191508a601f8301126115d457600080fd5b8135818111156115e357600080fd5b8b60208285010111156115f557600080fd5b60209283019950975090890135908082111561161057600080fd5b61161c8b838c01611389565b909750955060408a0135945060608a0135935060808a013591508082111561164357600080fd5b506116508a828b016113d5565b91505092959891949750929550565b60006020828403121561167157600080fd5b5035919050565b6000806040838503121561168b57600080fd5b82359150602083013561145d81611aba565b600080604083850312156116b057600080fd5b823591506020830135801515811461145d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452611708816020860160208601611a3d565b601f01601f19169290920160200192915050565b6000825161172e818460208701611a3d565b9190910192915050565b60808152600061174c60808301888a6116c7565b602083820381850152818783528183019050818860051b8401018960005b8a8110156117d957858303601f190184528135368d9003601e1901811261179057600080fd5b8c01803567ffffffffffffffff8111156117a957600080fd5b8036038e13156117b857600080fd5b6117c585828985016116c7565b95870195945050509084019060010161176a565b505060408601979097525050505060600152949350505050565b60208152600061124960208301846116f0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825282548282015260018084015460ff81161515604085015260081c6001600160a01b039081166060850152600285015416608084015260a080840152600384018054600093929190849080841c8185168061194957607f821691505b86821081141561196757634e487b7160e01b84526022600452602484fd5b60c0890182905260e089018180156119865760018114611997576119c2565b60ff198516825288820195506119c2565b60008781526020902060005b858110156119bc57815484820152908901908a016119a3565b83019650505b50939a9950505050505050505050565b85815284151560208201526001600160a01b0384811660408301528316606082015260a060808201819052600090611a0c908301846116f0565b979650505050505050565b60008219821115611a3857634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015611a58578181015183820152602001611a40565b838111156110c65750506000910152565b600181811c90821680611a7d57607f821691505b60208210811415611a9e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461057157600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a147e58c05b20357cb3919a570b985d63b405a5c57197b71f94854fda882a9a64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "deactivateVaultAsDao(uint256,address)": { + "notice": "A DAO can set a Vault as inactive " + }, + "setDelegate(address,address)": { + "notice": "Allow a Dao to set a delegate that can manage vault enteries " + }, + "setNewVault(address,address,string)": { + "notice": "set a new Vault as active on existing dao (owner only) " + }, + "setVault(uint256,bool)": { + "notice": "set a Vault as active or not on existing dao (owner only) " + }, + "summonBaalAndVault(bytes,bytes[],uint256,bytes32,string)": { + "notice": "Summon a new baal and add a Vault " + }, + "summonVault(address,string)": { + "notice": "create and add a Vault(Safe) to an existing DAO " + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13477, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_baalSummoner", + "offset": 0, + "slot": "201", + "type": "t_contract(IBaalSummoner)14323" + }, + { + "astId": 13479, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaultIdx", + "offset": 0, + "slot": "202", + "type": "t_uint256" + }, + { + "astId": 13495, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaults", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_uint256,t_struct(Vault)13490_storage)" + }, + { + "astId": 13499, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "delegates", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IBaalSummoner)14323": { + "encoding": "inplace", + "label": "contract IBaalSummoner", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_struct(Vault)13490_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct BaalAndVaultSummoner.Vault)", + "numberOfBytes": "32", + "value": "t_struct(Vault)13490_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Vault)13490_storage": { + "encoding": "inplace", + "label": "struct BaalAndVaultSummoner.Vault", + "members": [ + { + "astId": 13481, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 13483, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "active", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 13485, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "daoAddress", + "offset": 1, + "slot": "1", + "type": "t_address" + }, + { + "astId": 13487, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaultAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 13489, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/BaalAndVaultSummoner_Proxy.json b/deployments/base/BaalAndVaultSummoner_Proxy.json new file mode 100644 index 0000000..7eb61d2 --- /dev/null +++ b/deployments/base/BaalAndVaultSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "transactionIndex": 1, + "gasUsed": "335553", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000010000000000400010000000000000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000008000000000000000000000000020000004000000000000040000000000000000000000000000000020000000200000008000000000000000000000000000000000000000000000000000", + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3", + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000763f5c2e59f997a6cc48bf1228abf61325244702" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + }, + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + }, + { + "transactionIndex": 1, + "blockNumber": 7428951, + "transactionHash": "0xdc524ed14d46eb30f4e339ea0084d130a8d14cff11eec0c57438f5f570fbb596", + "address": "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x6ccca453d75661c943489c69d14f70e1cc25a0e31b3049712908c6caff0a1bd3" + } + ], + "blockNumber": 7428951, + "cumulativeGasUsed": "399566", + "status": 1, + "byzantium": true + }, + "args": [ + "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/BaalSummoner.json b/deployments/base/BaalSummoner.json new file mode 100644 index 0000000..e945508 --- /dev/null +++ b/deployments/base/BaalSummoner.json @@ -0,0 +1,666 @@ +{ + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "DaoReferral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "baalSafe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "moduleAddr", + "type": "address" + } + ], + "name": "DeployBaalSafe", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "SetAddrsVersion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "loot", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "shares", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "forwarder", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "existingAddrs", + "type": "uint256" + } + ], + "name": "SummonBaal", + "type": "event" + }, + { + "inputs": [], + "name": "addrsVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_moduleAddr", + "type": "address" + } + ], + "name": "deployAndSetupSafe", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "deployTokens", + "outputs": [ + { + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisFallbackLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisMultisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_template", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisFallbackLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisMultisendLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSafeProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_moduleProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_lootSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_sharesSingleton", + "type": "address" + } + ], + "name": "setAddrs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharesSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "summonBaal", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "template", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "transactionIndex": 5, + "gasUsed": "333434", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000080000000000000000004004000080000000000000000400000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000000000000000000000020000000200000000000000000000000040000000000000000000000000002000000", + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a", + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b2b3909661552942ae1115e9fc99df0bc93d71d0" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + }, + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + }, + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + } + ], + "blockNumber": 7428902, + "cumulativeGasUsed": "562179", + "status": 1, + "byzantium": true + }, + "args": [ + "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/BaalSummoner_Implementation.json b/deployments/base/BaalSummoner_Implementation.json new file mode 100644 index 0000000..c14cae9 --- /dev/null +++ b/deployments/base/BaalSummoner_Implementation.json @@ -0,0 +1,785 @@ +{ + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "DaoReferral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "baalSafe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "moduleAddr", + "type": "address" + } + ], + "name": "DeployBaalSafe", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "SetAddrsVersion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "loot", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "shares", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "forwarder", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "existingAddrs", + "type": "uint256" + } + ], + "name": "SummonBaal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "addrsVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_moduleAddr", + "type": "address" + } + ], + "name": "deployAndSetupSafe", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "deployTokens", + "outputs": [ + { + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisFallbackLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisMultisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_template", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisFallbackLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisMultisendLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSafeProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_moduleProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_lootSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_sharesSingleton", + "type": "address" + } + ], + "name": "setAddrs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharesSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "summonBaal", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "template", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "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" + } + ], + "transactionHash": "0x3bcb945187d39306ba5de319a824d9ccf2461d521fd02bb10522ba4843ff7112", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "transactionIndex": 2, + "gasUsed": "2540948", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x321fab5959a3459d5cfe0d2a82e4b351e9cf85ce8dc0b01ab41915a550839017", + "transactionHash": "0x3bcb945187d39306ba5de319a824d9ccf2461d521fd02bb10522ba4843ff7112", + "logs": [], + "blockNumber": 7428900, + "cumulativeGasUsed": "2702897", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "928daf6847beb441da40e990eb20d125", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"}],\"name\":\"DaoReferral\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"baalSafe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"}],\"name\":\"DeployBaalSafe\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"name\":\"DeployBaalTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"SetAddrsVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"loot\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"shares\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"existingAddrs\",\"type\":\"uint256\"}],\"name\":\"SummonBaal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addrsVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_moduleAddr\",\"type\":\"address\"}],\"name\":\"deployAndSetupSafe\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"deployTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_calls\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"encodeMultisend\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedMultisend\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisFallbackLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisMultisendLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lootSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_template\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisSingleton\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisFallbackLibrary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisMultisendLibrary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisSafeProxyFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_moduleProxyFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lootSingleton\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sharesSingleton\",\"type\":\"address\"}],\"name\":\"setAddrs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharesSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"summonBaal\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"}],\"name\":\"summonBaalFromReferrer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"template\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BaalSummoner.sol\":\"BaalSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\\n/// @author Richard Meissner - \\ninterface IProxy {\\n function masterCopy() external view returns (address);\\n}\\n\\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafeProxy {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\\n address internal singleton;\\n\\n /// @dev Constructor function sets address of singleton contract.\\n /// @param _singleton Singleton address.\\n constructor(address _singleton) {\\n require(_singleton != address(0), \\\"Invalid singleton address provided\\\");\\n singleton = _singleton;\\n }\\n\\n /// @dev Fallback function forwards all transactions and returns all received return data.\\n fallback() external payable {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\\n // 0xa619486e == keccak(\\\"masterCopy()\\\"). The value is right padded to 32-bytes with 0s\\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\\n mstore(0, _singleton)\\n return(0, 0x20)\\n }\\n calldatacopy(0, 0, calldatasize())\\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if eq(success, 0) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3bfdd453d9f896f7029d15bcafd11886957b320ad1764309d9f74fa059715249\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./GnosisSafeProxy.sol\\\";\\nimport \\\"./IProxyCreationCallback.sol\\\";\\n\\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n/// @author Stefan George - \\ncontract GnosisSafeProxyFactory {\\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param singleton Address of singleton contract.\\n /// @param data Payload for message call sent to new proxy contract.\\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\\n proxy = new GnosisSafeProxy(singleton);\\n if (data.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, singleton);\\n }\\n\\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\\n function proxyRuntimeCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).runtimeCode;\\n }\\n\\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\\n function proxyCreationCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).creationCode;\\n }\\n\\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\\n /// This method is only meant as an utility to be called from other methods\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function deployProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) internal returns (GnosisSafeProxy proxy) {\\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\\n }\\n require(address(proxy) != address(0), \\\"Create2 call failed\\\");\\n }\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function createProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n if (initializer.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, _singleton);\\n }\\n\\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\\n function createProxyWithCallback(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce,\\n IProxyCreationCallback callback\\n ) public returns (GnosisSafeProxy proxy) {\\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\\n }\\n\\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function calculateCreateProxyWithNonceAddress(\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n revert(string(abi.encodePacked(proxy)));\\n }\\n}\\n\",\"keccak256\":\"0x187c6f84c71b432da6721c1b81cebfbb9c37c0cc15ebd8de5a14ff7ec6db2d9e\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"./GnosisSafeProxy.sol\\\";\\n\\ninterface IProxyCreationCallback {\\n function proxyCreated(\\n GnosisSafeProxy proxy,\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external;\\n}\\n\",\"keccak256\":\"0x51a9ce914a6a943651c803541e44218a7ed0a2f98a94d55df66b173b5a11e365\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\ncontract ModuleProxyFactory {\\n event ModuleProxyCreation(\\n address indexed proxy,\\n address indexed masterCopy\\n );\\n\\n /// `target` can not be zero.\\n error ZeroAddress(address target);\\n\\n /// `target` has no code deployed.\\n error TargetHasNoCode(address target);\\n\\n /// `address_` is already taken.\\n error TakenAddress(address address_);\\n\\n /// @notice Initialization failed.\\n error FailedInitialization();\\n\\n function createProxy(address target, bytes32 salt)\\n internal\\n returns (address result)\\n {\\n if (address(target) == address(0)) revert ZeroAddress(target);\\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\\n bytes memory deployment = abi.encodePacked(\\n hex\\\"602d8060093d393df3363d3d373d3d3d363d73\\\",\\n target,\\n hex\\\"5af43d82803e903d91602b57fd5bf3\\\"\\n );\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\\n }\\n if (result == address(0)) revert TakenAddress(result);\\n }\\n\\n function deployModule(\\n address masterCopy,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (address proxy) {\\n proxy = createProxy(\\n masterCopy,\\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\\n );\\n (bool success, ) = proxy.call(initializer);\\n if (!success) revert FailedInitialization();\\n\\n emit ModuleProxyCreation(proxy, masterCopy);\\n }\\n}\\n\",\"keccak256\":\"0x40a3eb64fec76f1f77656a77b4c469b299f2d8b0523ed0f207d3879455c06a70\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/BaalSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"./Baal.sol\\\";\\n\\ncontract BaalSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\\n // when some of the init addresses are updated\\n uint256 public addrsVersion;\\n\\n address payable public template; // fixed template for baal using eip-1167 proxy pattern\\n\\n // Template contract to use for new Gnosis safe proxies\\n address public gnosisSingleton;\\n\\n // Library to use for EIP1271 compatability\\n address public gnosisFallbackLibrary;\\n\\n // Library to use for all safe transaction executions\\n address public gnosisMultisendLibrary;\\n\\n // template contract to clone for loot ERC20 token\\n address public lootSingleton;\\n\\n // template contract to clone for shares ERC20 token\\n address public sharesSingleton;\\n\\n // Proxy summoners\\n //\\n GnosisSafeProxyFactory gnosisSafeProxyFactory;\\n ModuleProxyFactory moduleProxyFactory;\\n\\n event SetAddrsVersion(\\n uint256 version\\n );\\n\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n\\n event DaoReferral(\\n bytes32 referrer,\\n address daoAddress\\n );\\n\\n event DeployBaalTokens(\\n address lootToken, \\n address sharesToken\\n );\\n\\n event DeployBaalSafe(\\n address baalSafe,\\n address moduleAddr\\n );\\n\\n function initialize() initializer public {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n // must be called after deploy to set libraries\\n function setAddrs(\\n address payable _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) public onlyOwner {\\n require(_lootSingleton != address(0), \\\"!lootSingleton\\\");\\n require(_sharesSingleton != address(0), \\\"!sharesSingleton\\\");\\n require(_gnosisSingleton != address(0), \\\"!gnosisSingleton\\\");\\n require(_gnosisFallbackLibrary != address(0), '!gnosisFallbackLibrary');\\n require(_gnosisMultisendLibrary != address(0), '!gnosisMultisendLibrary');\\n require(_gnosisSafeProxyFactory != address(0), '!gnosisSafeProxyFactory');\\n require(_moduleProxyFactory != address(0), '!moduleProxyFactory');\\n\\n template = _template;\\n gnosisSingleton = _gnosisSingleton;\\n gnosisFallbackLibrary = _gnosisFallbackLibrary;\\n gnosisMultisendLibrary = _gnosisMultisendLibrary;\\n gnosisSafeProxyFactory = GnosisSafeProxyFactory(_gnosisSafeProxyFactory);\\n moduleProxyFactory = ModuleProxyFactory(_moduleProxyFactory);\\n lootSingleton = _lootSingleton;\\n sharesSingleton = _sharesSingleton;\\n\\n emit SetAddrsVersion(\\n addrsVersion++\\n );\\n \\n }\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n public\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n function summonBaal(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce\\n ) external returns (address) {\\n \\n return\\n _summonBaal(\\n initializationParams,\\n initializationActions,\\n _saltNonce\\n );\\n }\\n\\n // Add a referrer to help keep track of where deploies are coming from\\n function summonBaalFromReferrer(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address) {\\n address daoAddress;\\n\\n daoAddress = _summonBaal(\\n initializationParams,\\n initializationActions,\\n _saltNonce\\n );\\n\\n emit DaoReferral(referrer, daoAddress);\\n return daoAddress;\\n }\\n\\n // deploy new share and loot contracts\\n function deployTokens(string memory _name, string memory _symbol) \\n public \\n returns (address lootToken, address sharesToken) \\n {\\n lootToken = address(new ERC1967Proxy(\\n lootSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(lootSingleton).setUp.selector, \\n string(abi.encodePacked(_name, \\\" LOOT\\\")), \\n string(abi.encodePacked(_symbol, \\\"-LOOT\\\")))\\n ));\\n\\n sharesToken = address(new ERC1967Proxy(\\n sharesSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(sharesSingleton).setUp.selector, \\n _name, \\n _symbol)\\n ));\\n\\n emit DeployBaalTokens(lootToken, sharesToken);\\n\\n }\\n\\n // deploy a safe with module and single module signer setup\\n function deployAndSetupSafe(address _moduleAddr)\\n public\\n returns (address)\\n {\\n // Deploy new safe but do not set it up yet\\n GnosisSafe _safe = GnosisSafe(\\n payable(\\n gnosisSafeProxyFactory.createProxy(\\n gnosisSingleton,\\n bytes(\\\"\\\")\\n )\\n )\\n );\\n // Generate delegate calls so the safe calls enableModule on itself during setup\\n bytes memory _enableBaal = abi.encodeWithSignature(\\n \\\"enableModule(address)\\\",\\n address(_moduleAddr)\\n );\\n bytes memory _enableBaalMultisend = abi.encodePacked(\\n uint8(0),\\n address(_safe),\\n uint256(0),\\n uint256(_enableBaal.length),\\n bytes(_enableBaal)\\n );\\n\\n bytes memory _multisendAction = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n _enableBaalMultisend\\n );\\n\\n // Workaround for solidity dynamic memory array\\n address[] memory _owners = new address[](1);\\n _owners[0] = address(_moduleAddr);\\n\\n // Call setup on safe to enable our new module and set the module as the only signer\\n _safe.setup(\\n _owners,\\n 1,\\n gnosisMultisendLibrary,\\n _multisendAction,\\n gnosisFallbackLibrary,\\n address(0),\\n 0,\\n payable(address(0))\\n );\\n\\n emit DeployBaalSafe(address(_safe), address(_moduleAddr));\\n\\n return address(_safe);\\n }\\n\\n // advanced summon baal with different configurations\\n // name and symbol can be blank if bringing own baal tokens\\n // zero address for either loot or shares token will summon new ones\\n // if bringing own tokens the ownership must be transfered to the new DAO\\n // zero address for Safe with summon and setup a new Safe\\n // if bringing existing safe the new dao must be enabled as a module\\n // todo: add a simple summon that just creates a dao with a single summoner\\n function _summonBaal(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce\\n ) internal returns (address) {\\n uint256 existingAddrs; // 1 tokens, 2 safe, 3 both\\n (\\n string memory _name, /*_name Name for erc20 `shares` accounting, empty if token */\\n string memory _symbol, /*_symbol Symbol for erc20 `shares` accounting, empty if token*/\\n address _safeAddr, /*address of safe, 0 addr if new*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771), 0 addr if initially disabled*/\\n address _lootToken, /*predeployed loot token, 0 addr if new*/\\n address _sharesToken /*predeployed shares token, 0 addr if new*/\\n ) = abi.decode(initializationParams, (string, string, address, address, address, address));\\n\\n Baal _baal = Baal(\\n moduleProxyFactory.deployModule(\\n template, \\n abi.encodeWithSignature(\\\"avatar()\\\"), \\n _saltNonce\\n )\\n );\\n\\n // if loot or shares are zero address new tokens are deployed\\n // tokens need to be baalTokens\\n if(_lootToken == address(0) || _sharesToken == address(0)){\\n (_lootToken, _sharesToken) = deployTokens(_name, _symbol);\\n // pause tokens by default and transfer to the DAO\\n IBaalToken(_lootToken).pause();\\n IBaalToken(_sharesToken).pause();\\n IBaalToken(_lootToken).transferOwnership(address(_baal));\\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\\n } else {\\n existingAddrs += 1;\\n }\\n\\n // if zero address deploy a new safe\\n // Needs to be a valid zodiac treasury\\n if(_safeAddr == address(0)){\\n _safeAddr = deployAndSetupSafe(address(_baal));\\n } else {\\n existingAddrs += 2;\\n }\\n\\n bytes memory _initializationMultisendData = encodeMultisend(\\n initializationActions,\\n address(_baal)\\n );\\n bytes memory _initializer = abi.encode(\\n _lootToken,\\n _sharesToken,\\n gnosisMultisendLibrary,\\n _safeAddr,\\n _forwarder,\\n _initializationMultisendData\\n );\\n // can run the actions now because we have a baal\\n _baal.setUp(_initializer);\\n\\n emit SummonBaal(\\n address(_baal),\\n address(_baal.lootToken()),\\n address(_baal.sharesToken()),\\n _safeAddr,\\n _forwarder,\\n existingAddrs\\n );\\n\\n return (address(_baal));\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n onlyOwner\\n override\\n {}\\n}\\n\",\"keccak256\":\"0x4053036af806c618440986e05da32008fd83cfee2e631fd3bed8b581045ee913\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b50608051612d2161004c60003960008181610483015281816104cf01528181610593015281816105d601526106720152612d216000f3fe608060405260043610620001375760003560e01c8063881e4ea411620000ad578063d9118ce7116200006c578063d9118ce71462000364578063ebfb8a431462000386578063f0fa28b914620003ab578063f2fde38b14620003cd578063f884231c14620003f257600080fd5b8063881e4ea414620002865780638da5cb5b14620002a857806397fc9fbb14620002c8578063a2346618146200030e578063d61f27ae146200033057600080fd5b80634f1ef28611620000fa5780634f1ef286146200020557806352d1902d146200021c5780636f2ddd931462000234578063715018a614620002565780638129fc1c146200026e57600080fd5b8063209f3695146200013c57806321d56a43146200017057806323626b4514620001925780633659cfe614620001b95780634a8b0b3214620001e0575b600080fd5b620001536200014d36600462001b6e565b62000417565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156200017d57600080fd5b5060cb5462000153906001600160a01b031681565b3480156200019f57600080fd5b50620001aa60c95481565b60405190815260200162000167565b348015620001c657600080fd5b50620001de620001d836600462001c09565b62000478565b005b348015620001ed57600080fd5b5062000153620001ff36600462001c29565b6200056d565b620001de6200021636600462001d65565b62000588565b3480156200022957600080fd5b50620001aa62000665565b3480156200024157600080fd5b5060ca5462000153906001600160a01b031681565b3480156200026357600080fd5b50620001de6200071b565b3480156200027b57600080fd5b50620001de62000733565b3480156200029357600080fd5b5060cd5462000153906001600160a01b031681565b348015620002b557600080fd5b506033546001600160a01b031662000153565b348015620002d557600080fd5b50620002ed620002e736600462001dbb565b62000856565b604080516001600160a01b0393841681529290911660208301520162000167565b3480156200031b57600080fd5b5060cf5462000153906001600160a01b031681565b3480156200033d57600080fd5b50620003556200034f36600462001eac565b62000a17565b60405162000167919062001f76565b3480156200037157600080fd5b5060ce5462000153906001600160a01b031681565b3480156200039357600080fd5b50620001de620003a536600462001f8b565b62000aec565b348015620003b857600080fd5b5060cc5462000153906001600160a01b031681565b348015620003da57600080fd5b50620001de620003ec36600462001c09565b62000df0565b348015620003ff57600080fd5b50620001536200041136600462001c09565b62000e6c565b600080620004298888888888620010c4565b604080518581526001600160a01b03831660208201529192507fe1e7ecd08b1e119c2755872e95180d0d070137a7c2af361de1d7256bc3674107910160405180910390a1979650505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620004cd5760405162461bcd60e51b8152600401620004c49062002045565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200051860008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620005415760405162461bcd60e51b8152600401620004c49062002091565b6200054c81620015a4565b604080516000808252602082019092526200056a91839190620015ae565b50565b60006200057e8686868686620010c4565b9695505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005d45760405162461bcd60e51b8152600401620004c49062002045565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200061f60008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620006485760405162461bcd60e51b8152600401620004c49062002091565b6200065382620015a4565b6200066182826001620015ae565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007075760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620004c4565b5060008051602062002ca583398151915290565b620007256200172b565b62000731600062001787565b565b600054610100900460ff1615808015620007545750600054600160ff909116105b80620007705750303b15801562000770575060005460ff166001145b620007d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620004c4565b6000805460ff191660011790558015620007f9576000805461ff0019166101001790555b62000803620017d9565b6200080d6200180d565b80156200056a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60ce5460405160009182916001600160a01b039091169063562d190d60e01b9062000886908790602001620020dd565b60405160208183030381529060405285604051602001620008a8919062002108565b60408051601f1981840301815290829052620008c8929160240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620009079062001acc565b620009149291906200215c565b604051809103906000f08015801562000931573d6000803e3d6000fd5b5060cf546040519193506001600160a01b03169063562d190d60e01b9062000960908790879060240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516200099f9062001acc565b620009ac9291906200215c565b604051809103906000f080158015620009c9573d6000803e3d6000fd5b50604080516001600160a01b038086168252831660208201529192507ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a19250929050565b60608060005b845181101562000aa65781600085600088858151811062000a425762000a426200218a565b60200260200101515189868151811062000a605762000a606200218a565b602002602001015160405160200162000a7f96959493929190620021a0565b6040516020818303038152906040529150808062000a9d9062002224565b91505062000a1d565b508060405160240162000aba919062001f76565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b62000af66200172b565b6001600160a01b03821662000b3f5760405162461bcd60e51b815260206004820152600e60248201526d10b637b7ba29b4b733b632ba37b760911b6044820152606401620004c4565b6001600160a01b03811662000b8a5760405162461bcd60e51b815260206004820152601060248201526f10b9b430b932b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03871662000bd55760405162461bcd60e51b815260206004820152601060248201526f10b3b737b9b4b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03861662000c265760405162461bcd60e51b815260206004820152601660248201527521676e6f73697346616c6c6261636b4c69627261727960501b6044820152606401620004c4565b6001600160a01b03851662000c7e5760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369734d756c746973656e644c6962726172790000000000000000006044820152606401620004c4565b6001600160a01b03841662000cd65760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369735361666550726f7879466163746f72790000000000000000006044820152606401620004c4565b6001600160a01b03831662000d245760405162461bcd60e51b8152602060048201526013602482015272216d6f64756c6550726f7879466163746f727960681b6044820152606401620004c4565b60ca80546001600160a01b03199081166001600160a01b038b81169190911790925560cb805482168a841617905560cc8054821689841617905560cd8054821688841617905560d08054821687841617905560d18054821686841617905560ce8054821685841617905560cf805490911691831691909117905560c980547fe6fb5c8c5a2615df9d8de2df2fdebdae949bcf3a2a80cb8ff90ace3459de85cc91600062000dd18362002224565b9091555060405190815260200160405180910390a15050505050505050565b62000dfa6200172b565b6001600160a01b03811662000e615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620004c4565b6200056a8162001787565b60d05460cb5460408051602081018252600080825291516361b69abd60e01b8152919384936001600160a01b03918216936361b69abd9362000eb69390921691906004016200215c565b6020604051808303816000875af115801562000ed6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efc919062002242565b6040516001600160a01b038516602482015290915060009060440160408051601f19818403018152918152602080830180516001600160e01b031663610b592560e01b1790528251915192935060009262000f61928492879284929188910162002262565b604051602081830303815290604052905060008160405160240162000f87919062001f76565b60408051601f19818403018152918152602080830180516001600160e01b03166346c07f8560e11b1790528151600180825281840190935292935060009291908281019080368337019050509050868160008151811062000fec5762000fec6200218a565b6001600160a01b03928316602091820292909201015260cd5460cc5460405163b63e800d60e01b81528884169363b63e800d9362001041938793600193928316928a92169060009081908190600401620022ba565b600060405180830381600087803b1580156200105c57600080fd5b505af115801562001071573d6000803e3d6000fd5b5050604080516001600160a01b03808a1682528b1660208201527f7ad675e6593a2c3bdf52607876353caf39853572dd787d2a5eed1cc99097b3f0935001905060405180910390a1509295945050505050565b600080808080808080620010db8c8e018e6200237c565b955095509550955095509550600060d160009054906101000a90046001600160a01b03166001600160a01b031663f1ab873c60ca60009054906101000a90046001600160a01b0316604051602401604051602081830303815290604052632d77bef360e11b6001600160e01b0319166020820180516001600160e01b0383818316178352505050508d6040518463ffffffff1660e01b815260040162001184939291906200243a565b6020604051808303816000875af1158015620011a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011ca919062002242565b90506001600160a01b0383161580620011ea57506001600160a01b038216155b156200136e57620011fc878762000856565b8093508194505050826001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200124057600080fd5b505af115801562001255573d6000803e3d6000fd5b50505050816001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200129557600080fd5b505af1158015620012aa573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528616925063f2fde38b9150602401600060405180830381600087803b158015620012f257600080fd5b505af115801562001307573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b1580156200134f57600080fd5b505af115801562001364573d6000803e3d6000fd5b505050506200137e565b6200137b60018962002470565b97505b6001600160a01b038516620013a057620013988162000e6c565b9450620013b0565b620013ad60028962002470565b97505b6000620013c9620013c28d8f6200248b565b8362000a17565b60cd54604051919250600091620013f791879187916001600160a01b0316908b908b9088906020016200249a565b60408051601f198184030181529082905263a4f9edbf60e01b825291506001600160a01b0384169063a4f9edbf906200143590849060040162001f76565b600060405180830381600087803b1580156200145057600080fd5b505af115801562001465573d6000803e3d6000fd5b50505050826001600160a01b0316638009ba1f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014ce919062002242565b6001600160a01b0316836001600160a01b031663f460124d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001516573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200153c919062002242565b604080516001600160a01b038b811682528a811660208301529181018e905291811691908616907fcf2f09cd0dbc149b12a3630a11b7d73476660f3d08d3dc7dcc79c6dec555ee7a9060600160405180910390a450909e9d5050505050505050505050505050565b6200056a6200172b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615620015e957620015e48362001837565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562001646575060408051601f3d908101601f191682019092526200164391810190620024ec565b60015b620016ab5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620004c4565b60008051602062002ca583398151915281146200171d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620004c4565b50620015e4838383620018d6565b6033546001600160a01b03163314620007315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620004c4565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620018035760405162461bcd60e51b8152600401620004c49062002506565b6200073162001907565b600054610100900460ff16620007315760405162461bcd60e51b8152600401620004c49062002506565b6001600160a01b0381163b620018a65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620004c4565b60008051602062002ca583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620018e1836200193c565b600082511180620018ef5750805b15620015e4576200190183836200197e565b50505050565b600054610100900460ff16620019315760405162461bcd60e51b8152600401620004c49062002506565b620007313362001787565b620019478162001837565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620019e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620004c4565b600080846001600160a01b03168460405162001a05919062002551565b600060405180830381855af49150503d806000811462001a42576040519150601f19603f3d011682016040523d82523d6000602084013e62001a47565b606091505b509150915062001a72828260405180606001604052806027815260200162002cc56027913962001a7b565b95945050505050565b6060831562001a8c57508162001a98565b62001a98838362001a9f565b9392505050565b81511562001ab05781518083602001fd5b8060405162461bcd60e51b8152600401620004c4919062001f76565b610735806200257083390190565b60008083601f84011262001aed57600080fd5b50813567ffffffffffffffff81111562001b0657600080fd5b60208301915083602082850101111562001b1f57600080fd5b9250929050565b60008083601f84011262001b3957600080fd5b50813567ffffffffffffffff81111562001b5257600080fd5b6020830191508360208260051b850101111562001b1f57600080fd5b6000806000806000806080878903121562001b8857600080fd5b863567ffffffffffffffff8082111562001ba157600080fd5b62001baf8a838b0162001ada565b9098509650602089013591508082111562001bc957600080fd5b5062001bd889828a0162001b26565b979a9699509760408101359660609091013595509350505050565b6001600160a01b03811681146200056a57600080fd5b60006020828403121562001c1c57600080fd5b813562001a988162001bf3565b60008060008060006060868803121562001c4257600080fd5b853567ffffffffffffffff8082111562001c5b57600080fd5b62001c6989838a0162001ada565b9097509550602088013591508082111562001c8357600080fd5b5062001c928882890162001b26565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001ce65762001ce662001ca4565b604052919050565b600082601f83011262001d0057600080fd5b813567ffffffffffffffff81111562001d1d5762001d1d62001ca4565b62001d32601f8201601f191660200162001cba565b81815284602083860101111562001d4857600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121562001d7957600080fd5b823562001d868162001bf3565b9150602083013567ffffffffffffffff81111562001da357600080fd5b62001db18582860162001cee565b9150509250929050565b6000806040838503121562001dcf57600080fd5b823567ffffffffffffffff8082111562001de857600080fd5b62001df68683870162001cee565b9350602085013591508082111562001e0d57600080fd5b5062001db18582860162001cee565b600067ffffffffffffffff8084111562001e3a5762001e3a62001ca4565b8360051b602062001e4d81830162001cba565b8681529350908401908084018783111562001e6757600080fd5b855b8381101562001ea05780358581111562001e835760008081fd5b62001e918a828a0162001cee565b83525090820190820162001e69565b50505050509392505050565b6000806040838503121562001ec057600080fd5b823567ffffffffffffffff81111562001ed857600080fd5b8301601f8101851362001eea57600080fd5b62001efb8582356020840162001e1c565b925050602083013562001f0e8162001bf3565b809150509250929050565b60005b8381101562001f3657818101518382015260200162001f1c565b83811115620019015750506000910152565b6000815180845262001f6281602086016020860162001f19565b601f01601f19169290920160200192915050565b60208152600062001a98602083018462001f48565b600080600080600080600080610100898b03121562001fa957600080fd5b883562001fb68162001bf3565b9750602089013562001fc88162001bf3565b9650604089013562001fda8162001bf3565b9550606089013562001fec8162001bf3565b9450608089013562001ffe8162001bf3565b935060a0890135620020108162001bf3565b925060c0890135620020228162001bf3565b915060e0890135620020348162001bf3565b809150509295985092959890939650565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008251620020f181846020870162001f19565b64081313d3d560da1b920191825250600501919050565b600082516200211c81846020870162001f19565b640b5313d3d560da1b920191825250600501919050565b60408152600062002148604083018562001f48565b828103602084015262001a72818562001f48565b6001600160a01b0383168152604060208201819052600090620021829083018462001f48565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60008751620021b4818460208c0162001f19565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351620021fe81605584016020880162001f19565b0160550198975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156200223b576200223b6200220e565b5060010190565b6000602082840312156200225557600080fd5b815162001a988162001bf3565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251620022a981605585016020870162001f19565b919091016055019695505050505050565b6101008082528951908201819052600090610120830190602090818d01845b82811015620023005781516001600160a01b031685529383019390830190600101620022d9565b50505083018a90526001600160a01b038916604084015282810360608401526200232b818962001f48565b9150506200234460808301876001600160a01b03169052565b6001600160a01b03851660a08301528360c08301526200236f60e08301846001600160a01b03169052565b9998505050505050505050565b60008060008060008060c087890312156200239657600080fd5b863567ffffffffffffffff80821115620023af57600080fd5b620023bd8a838b0162001cee565b97506020890135915080821115620023d457600080fd5b50620023e389828a0162001cee565b9550506040870135620023f68162001bf3565b93506060870135620024088162001bf3565b925060808701356200241a8162001bf3565b915060a08701356200242c8162001bf3565b809150509295509295509295565b6001600160a01b0384168152606060208201819052600090620024609083018562001f48565b9050826040830152949350505050565b600082198211156200248657620024866200220e565b500190565b600062001a9836848462001e1c565b6001600160a01b0387811682528681166020830152858116604083015284811660608301528316608082015260c060a08201819052600090620024e09083018462001f48565b98975050505050505050565b600060208284031215620024ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516200256581846020870162001f19565b919091019291505056fe60806040526040516107353803806107358339810160408190526100229161031e565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ec565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b81526004016101489190610408565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561030d5781810151838201526020016102f5565b838111156100645750506000910152565b6000806040838503121561033157600080fd5b82516001600160a01b038116811461034857600080fd5b60208401519092506001600160401b038082111561036557600080fd5b818501915085601f83011261037957600080fd5b81518181111561038b5761038b6102dc565b604051601f8201601f19908116603f011681019083821181831017156103b3576103b36102dc565b816040528281528860208487010111156103cc57600080fd5b6103dd8360208301602088016102f2565b80955050505050509250929050565b600082516103fe8184602087016102f2565b9190910192915050565b60208152600082518060208401526104278160408501602087016102f2565b601f01601f19169190910160400192915050565b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207412a0b3e226211217f19a3b0db835079d54492e8c6a40cf0ec680c2ad3f06ee64736f6c634300080a0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bc2877b2a93adc52a277122972e8c6137b7c0334e3648c825f4d4baaefb717c364736f6c634300080a0033", + "deployedBytecode": "0x608060405260043610620001375760003560e01c8063881e4ea411620000ad578063d9118ce7116200006c578063d9118ce71462000364578063ebfb8a431462000386578063f0fa28b914620003ab578063f2fde38b14620003cd578063f884231c14620003f257600080fd5b8063881e4ea414620002865780638da5cb5b14620002a857806397fc9fbb14620002c8578063a2346618146200030e578063d61f27ae146200033057600080fd5b80634f1ef28611620000fa5780634f1ef286146200020557806352d1902d146200021c5780636f2ddd931462000234578063715018a614620002565780638129fc1c146200026e57600080fd5b8063209f3695146200013c57806321d56a43146200017057806323626b4514620001925780633659cfe614620001b95780634a8b0b3214620001e0575b600080fd5b620001536200014d36600462001b6e565b62000417565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156200017d57600080fd5b5060cb5462000153906001600160a01b031681565b3480156200019f57600080fd5b50620001aa60c95481565b60405190815260200162000167565b348015620001c657600080fd5b50620001de620001d836600462001c09565b62000478565b005b348015620001ed57600080fd5b5062000153620001ff36600462001c29565b6200056d565b620001de6200021636600462001d65565b62000588565b3480156200022957600080fd5b50620001aa62000665565b3480156200024157600080fd5b5060ca5462000153906001600160a01b031681565b3480156200026357600080fd5b50620001de6200071b565b3480156200027b57600080fd5b50620001de62000733565b3480156200029357600080fd5b5060cd5462000153906001600160a01b031681565b348015620002b557600080fd5b506033546001600160a01b031662000153565b348015620002d557600080fd5b50620002ed620002e736600462001dbb565b62000856565b604080516001600160a01b0393841681529290911660208301520162000167565b3480156200031b57600080fd5b5060cf5462000153906001600160a01b031681565b3480156200033d57600080fd5b50620003556200034f36600462001eac565b62000a17565b60405162000167919062001f76565b3480156200037157600080fd5b5060ce5462000153906001600160a01b031681565b3480156200039357600080fd5b50620001de620003a536600462001f8b565b62000aec565b348015620003b857600080fd5b5060cc5462000153906001600160a01b031681565b348015620003da57600080fd5b50620001de620003ec36600462001c09565b62000df0565b348015620003ff57600080fd5b50620001536200041136600462001c09565b62000e6c565b600080620004298888888888620010c4565b604080518581526001600160a01b03831660208201529192507fe1e7ecd08b1e119c2755872e95180d0d070137a7c2af361de1d7256bc3674107910160405180910390a1979650505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620004cd5760405162461bcd60e51b8152600401620004c49062002045565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200051860008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620005415760405162461bcd60e51b8152600401620004c49062002091565b6200054c81620015a4565b604080516000808252602082019092526200056a91839190620015ae565b50565b60006200057e8686868686620010c4565b9695505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005d45760405162461bcd60e51b8152600401620004c49062002045565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200061f60008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620006485760405162461bcd60e51b8152600401620004c49062002091565b6200065382620015a4565b6200066182826001620015ae565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007075760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620004c4565b5060008051602062002ca583398151915290565b620007256200172b565b62000731600062001787565b565b600054610100900460ff1615808015620007545750600054600160ff909116105b80620007705750303b15801562000770575060005460ff166001145b620007d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620004c4565b6000805460ff191660011790558015620007f9576000805461ff0019166101001790555b62000803620017d9565b6200080d6200180d565b80156200056a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60ce5460405160009182916001600160a01b039091169063562d190d60e01b9062000886908790602001620020dd565b60405160208183030381529060405285604051602001620008a8919062002108565b60408051601f1981840301815290829052620008c8929160240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620009079062001acc565b620009149291906200215c565b604051809103906000f08015801562000931573d6000803e3d6000fd5b5060cf546040519193506001600160a01b03169063562d190d60e01b9062000960908790879060240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516200099f9062001acc565b620009ac9291906200215c565b604051809103906000f080158015620009c9573d6000803e3d6000fd5b50604080516001600160a01b038086168252831660208201529192507ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a19250929050565b60608060005b845181101562000aa65781600085600088858151811062000a425762000a426200218a565b60200260200101515189868151811062000a605762000a606200218a565b602002602001015160405160200162000a7f96959493929190620021a0565b6040516020818303038152906040529150808062000a9d9062002224565b91505062000a1d565b508060405160240162000aba919062001f76565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b62000af66200172b565b6001600160a01b03821662000b3f5760405162461bcd60e51b815260206004820152600e60248201526d10b637b7ba29b4b733b632ba37b760911b6044820152606401620004c4565b6001600160a01b03811662000b8a5760405162461bcd60e51b815260206004820152601060248201526f10b9b430b932b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03871662000bd55760405162461bcd60e51b815260206004820152601060248201526f10b3b737b9b4b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03861662000c265760405162461bcd60e51b815260206004820152601660248201527521676e6f73697346616c6c6261636b4c69627261727960501b6044820152606401620004c4565b6001600160a01b03851662000c7e5760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369734d756c746973656e644c6962726172790000000000000000006044820152606401620004c4565b6001600160a01b03841662000cd65760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369735361666550726f7879466163746f72790000000000000000006044820152606401620004c4565b6001600160a01b03831662000d245760405162461bcd60e51b8152602060048201526013602482015272216d6f64756c6550726f7879466163746f727960681b6044820152606401620004c4565b60ca80546001600160a01b03199081166001600160a01b038b81169190911790925560cb805482168a841617905560cc8054821689841617905560cd8054821688841617905560d08054821687841617905560d18054821686841617905560ce8054821685841617905560cf805490911691831691909117905560c980547fe6fb5c8c5a2615df9d8de2df2fdebdae949bcf3a2a80cb8ff90ace3459de85cc91600062000dd18362002224565b9091555060405190815260200160405180910390a15050505050505050565b62000dfa6200172b565b6001600160a01b03811662000e615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620004c4565b6200056a8162001787565b60d05460cb5460408051602081018252600080825291516361b69abd60e01b8152919384936001600160a01b03918216936361b69abd9362000eb69390921691906004016200215c565b6020604051808303816000875af115801562000ed6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efc919062002242565b6040516001600160a01b038516602482015290915060009060440160408051601f19818403018152918152602080830180516001600160e01b031663610b592560e01b1790528251915192935060009262000f61928492879284929188910162002262565b604051602081830303815290604052905060008160405160240162000f87919062001f76565b60408051601f19818403018152918152602080830180516001600160e01b03166346c07f8560e11b1790528151600180825281840190935292935060009291908281019080368337019050509050868160008151811062000fec5762000fec6200218a565b6001600160a01b03928316602091820292909201015260cd5460cc5460405163b63e800d60e01b81528884169363b63e800d9362001041938793600193928316928a92169060009081908190600401620022ba565b600060405180830381600087803b1580156200105c57600080fd5b505af115801562001071573d6000803e3d6000fd5b5050604080516001600160a01b03808a1682528b1660208201527f7ad675e6593a2c3bdf52607876353caf39853572dd787d2a5eed1cc99097b3f0935001905060405180910390a1509295945050505050565b600080808080808080620010db8c8e018e6200237c565b955095509550955095509550600060d160009054906101000a90046001600160a01b03166001600160a01b031663f1ab873c60ca60009054906101000a90046001600160a01b0316604051602401604051602081830303815290604052632d77bef360e11b6001600160e01b0319166020820180516001600160e01b0383818316178352505050508d6040518463ffffffff1660e01b815260040162001184939291906200243a565b6020604051808303816000875af1158015620011a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011ca919062002242565b90506001600160a01b0383161580620011ea57506001600160a01b038216155b156200136e57620011fc878762000856565b8093508194505050826001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200124057600080fd5b505af115801562001255573d6000803e3d6000fd5b50505050816001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200129557600080fd5b505af1158015620012aa573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528616925063f2fde38b9150602401600060405180830381600087803b158015620012f257600080fd5b505af115801562001307573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b1580156200134f57600080fd5b505af115801562001364573d6000803e3d6000fd5b505050506200137e565b6200137b60018962002470565b97505b6001600160a01b038516620013a057620013988162000e6c565b9450620013b0565b620013ad60028962002470565b97505b6000620013c9620013c28d8f6200248b565b8362000a17565b60cd54604051919250600091620013f791879187916001600160a01b0316908b908b9088906020016200249a565b60408051601f198184030181529082905263a4f9edbf60e01b825291506001600160a01b0384169063a4f9edbf906200143590849060040162001f76565b600060405180830381600087803b1580156200145057600080fd5b505af115801562001465573d6000803e3d6000fd5b50505050826001600160a01b0316638009ba1f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014ce919062002242565b6001600160a01b0316836001600160a01b031663f460124d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001516573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200153c919062002242565b604080516001600160a01b038b811682528a811660208301529181018e905291811691908616907fcf2f09cd0dbc149b12a3630a11b7d73476660f3d08d3dc7dcc79c6dec555ee7a9060600160405180910390a450909e9d5050505050505050505050505050565b6200056a6200172b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615620015e957620015e48362001837565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562001646575060408051601f3d908101601f191682019092526200164391810190620024ec565b60015b620016ab5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620004c4565b60008051602062002ca583398151915281146200171d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620004c4565b50620015e4838383620018d6565b6033546001600160a01b03163314620007315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620004c4565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620018035760405162461bcd60e51b8152600401620004c49062002506565b6200073162001907565b600054610100900460ff16620007315760405162461bcd60e51b8152600401620004c49062002506565b6001600160a01b0381163b620018a65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620004c4565b60008051602062002ca583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620018e1836200193c565b600082511180620018ef5750805b15620015e4576200190183836200197e565b50505050565b600054610100900460ff16620019315760405162461bcd60e51b8152600401620004c49062002506565b620007313362001787565b620019478162001837565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620019e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620004c4565b600080846001600160a01b03168460405162001a05919062002551565b600060405180830381855af49150503d806000811462001a42576040519150601f19603f3d011682016040523d82523d6000602084013e62001a47565b606091505b509150915062001a72828260405180606001604052806027815260200162002cc56027913962001a7b565b95945050505050565b6060831562001a8c57508162001a98565b62001a98838362001a9f565b9392505050565b81511562001ab05781518083602001fd5b8060405162461bcd60e51b8152600401620004c4919062001f76565b610735806200257083390190565b60008083601f84011262001aed57600080fd5b50813567ffffffffffffffff81111562001b0657600080fd5b60208301915083602082850101111562001b1f57600080fd5b9250929050565b60008083601f84011262001b3957600080fd5b50813567ffffffffffffffff81111562001b5257600080fd5b6020830191508360208260051b850101111562001b1f57600080fd5b6000806000806000806080878903121562001b8857600080fd5b863567ffffffffffffffff8082111562001ba157600080fd5b62001baf8a838b0162001ada565b9098509650602089013591508082111562001bc957600080fd5b5062001bd889828a0162001b26565b979a9699509760408101359660609091013595509350505050565b6001600160a01b03811681146200056a57600080fd5b60006020828403121562001c1c57600080fd5b813562001a988162001bf3565b60008060008060006060868803121562001c4257600080fd5b853567ffffffffffffffff8082111562001c5b57600080fd5b62001c6989838a0162001ada565b9097509550602088013591508082111562001c8357600080fd5b5062001c928882890162001b26565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001ce65762001ce662001ca4565b604052919050565b600082601f83011262001d0057600080fd5b813567ffffffffffffffff81111562001d1d5762001d1d62001ca4565b62001d32601f8201601f191660200162001cba565b81815284602083860101111562001d4857600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121562001d7957600080fd5b823562001d868162001bf3565b9150602083013567ffffffffffffffff81111562001da357600080fd5b62001db18582860162001cee565b9150509250929050565b6000806040838503121562001dcf57600080fd5b823567ffffffffffffffff8082111562001de857600080fd5b62001df68683870162001cee565b9350602085013591508082111562001e0d57600080fd5b5062001db18582860162001cee565b600067ffffffffffffffff8084111562001e3a5762001e3a62001ca4565b8360051b602062001e4d81830162001cba565b8681529350908401908084018783111562001e6757600080fd5b855b8381101562001ea05780358581111562001e835760008081fd5b62001e918a828a0162001cee565b83525090820190820162001e69565b50505050509392505050565b6000806040838503121562001ec057600080fd5b823567ffffffffffffffff81111562001ed857600080fd5b8301601f8101851362001eea57600080fd5b62001efb8582356020840162001e1c565b925050602083013562001f0e8162001bf3565b809150509250929050565b60005b8381101562001f3657818101518382015260200162001f1c565b83811115620019015750506000910152565b6000815180845262001f6281602086016020860162001f19565b601f01601f19169290920160200192915050565b60208152600062001a98602083018462001f48565b600080600080600080600080610100898b03121562001fa957600080fd5b883562001fb68162001bf3565b9750602089013562001fc88162001bf3565b9650604089013562001fda8162001bf3565b9550606089013562001fec8162001bf3565b9450608089013562001ffe8162001bf3565b935060a0890135620020108162001bf3565b925060c0890135620020228162001bf3565b915060e0890135620020348162001bf3565b809150509295985092959890939650565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008251620020f181846020870162001f19565b64081313d3d560da1b920191825250600501919050565b600082516200211c81846020870162001f19565b640b5313d3d560da1b920191825250600501919050565b60408152600062002148604083018562001f48565b828103602084015262001a72818562001f48565b6001600160a01b0383168152604060208201819052600090620021829083018462001f48565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60008751620021b4818460208c0162001f19565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351620021fe81605584016020880162001f19565b0160550198975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156200223b576200223b6200220e565b5060010190565b6000602082840312156200225557600080fd5b815162001a988162001bf3565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251620022a981605585016020870162001f19565b919091016055019695505050505050565b6101008082528951908201819052600090610120830190602090818d01845b82811015620023005781516001600160a01b031685529383019390830190600101620022d9565b50505083018a90526001600160a01b038916604084015282810360608401526200232b818962001f48565b9150506200234460808301876001600160a01b03169052565b6001600160a01b03851660a08301528360c08301526200236f60e08301846001600160a01b03169052565b9998505050505050505050565b60008060008060008060c087890312156200239657600080fd5b863567ffffffffffffffff80821115620023af57600080fd5b620023bd8a838b0162001cee565b97506020890135915080821115620023d457600080fd5b50620023e389828a0162001cee565b9550506040870135620023f68162001bf3565b93506060870135620024088162001bf3565b925060808701356200241a8162001bf3565b915060a08701356200242c8162001bf3565b809150509295509295509295565b6001600160a01b0384168152606060208201819052600090620024609083018562001f48565b9050826040830152949350505050565b600082198211156200248657620024866200220e565b500190565b600062001a9836848462001e1c565b6001600160a01b0387811682528681166020830152858116604083015284811660608301528316608082015260c060a08201819052600090620024e09083018462001f48565b98975050505050505050565b600060208284031215620024ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516200256581846020870162001f19565b919091019291505056fe60806040526040516107353803806107358339810160408190526100229161031e565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ec565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b81526004016101489190610408565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561030d5781810151838201526020016102f5565b838111156100645750506000910152565b6000806040838503121561033157600080fd5b82516001600160a01b038116811461034857600080fd5b60208401519092506001600160401b038082111561036557600080fd5b818501915085601f83011261037957600080fd5b81518181111561038b5761038b6102dc565b604051601f8201601f19908116603f011681019083821181831017156103b3576103b36102dc565b816040528281528860208487010111156103cc57600080fd5b6103dd8360208301602088016102f2565b80955050505050509250929050565b600082516103fe8184602087016102f2565b9190910192915050565b60208152600082518060208401526104278160408501602087016102f2565b601f01601f19169190910160400192915050565b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207412a0b3e226211217f19a3b0db835079d54492e8c6a40cf0ec680c2ad3f06ee64736f6c634300080a0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bc2877b2a93adc52a277122972e8c6137b7c0334e3648c825f4d4baaefb717c364736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 12611, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "addrsVersion", + "offset": 0, + "slot": "201", + "type": "t_uint256" + }, + { + "astId": 12613, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "template", + "offset": 0, + "slot": "202", + "type": "t_address_payable" + }, + { + "astId": 12615, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisSingleton", + "offset": 0, + "slot": "203", + "type": "t_address" + }, + { + "astId": 12617, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisFallbackLibrary", + "offset": 0, + "slot": "204", + "type": "t_address" + }, + { + "astId": 12619, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisMultisendLibrary", + "offset": 0, + "slot": "205", + "type": "t_address" + }, + { + "astId": 12621, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "lootSingleton", + "offset": 0, + "slot": "206", + "type": "t_address" + }, + { + "astId": 12623, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "sharesSingleton", + "offset": 0, + "slot": "207", + "type": "t_address" + }, + { + "astId": 12626, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisSafeProxyFactory", + "offset": 0, + "slot": "208", + "type": "t_contract(GnosisSafeProxyFactory)3163" + }, + { + "astId": 12629, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "moduleProxyFactory", + "offset": 0, + "slot": "209", + "type": "t_contract(ModuleProxyFactory)3539" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(GnosisSafeProxyFactory)3163": { + "encoding": "inplace", + "label": "contract GnosisSafeProxyFactory", + "numberOfBytes": "20" + }, + "t_contract(ModuleProxyFactory)3539": { + "encoding": "inplace", + "label": "contract ModuleProxyFactory", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/BaalSummoner_Proxy.json b/deployments/base/BaalSummoner_Proxy.json new file mode 100644 index 0000000..edd6579 --- /dev/null +++ b/deployments/base/BaalSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "transactionIndex": 5, + "gasUsed": "333434", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000080000000000000000004004000080000000000000000400000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000000000000000000000020000000200000000000000000000000040000000000000000000000000002000000", + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a", + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000b2b3909661552942ae1115e9fc99df0bc93d71d0" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + }, + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + }, + { + "transactionIndex": 5, + "blockNumber": 7428902, + "transactionHash": "0x44d0039e9fd488577e6793307bf48e14ba5948a94fe6408baadfc964952c9ff5", + "address": "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0xdb1f7057466f3523855d11ce19a22de844b85fc07e24ef8913024bfbc0d7302a" + } + ], + "blockNumber": 7428902, + "cumulativeGasUsed": "562179", + "status": 1, + "byzantium": true + }, + "args": [ + "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/base/Loot.json b/deployments/base/Loot.json new file mode 100644 index 0000000..82e7a66 --- /dev/null +++ b/deployments/base/Loot.json @@ -0,0 +1,1186 @@ +{ + "address": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "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": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentSnapshotId", + "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": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "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" + } + ], + "transactionHash": "0x07b4a0525ce7b8a1ac2990f43405948e4980006fdcc9c98fec7eeb332da7eb11", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "transactionIndex": 11, + "gasUsed": "2319965", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x30ac0fe0b50f2549e3d893b2e68221d9e6c9a952967ec21bd48ed6528b9691e1", + "transactionHash": "0x07b4a0525ce7b8a1ac2990f43405948e4980006fdcc9c98fec7eeb332da7eb11", + "logs": [ + { + "transactionIndex": 11, + "blockNumber": 7428449, + "transactionHash": "0x07b4a0525ce7b8a1ac2990f43405948e4980006fdcc9c98fec7eeb332da7eb11", + "address": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 42, + "blockHash": "0x30ac0fe0b50f2549e3d893b2e68221d9e6c9a952967ec21bd48ed6528b9691e1" + } + ], + "blockNumber": 7428449, + "cumulativeGasUsed": "3726160", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSnapshotId\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"burn(address,uint256)\":{\"params\":{\"account\":\"Address to lose loot\",\"amount\":\"Amount to burn\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"params\":{\"amount\":\"Amount to mint\",\"recipient\":\"Address to receive loot\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(string,string)\":{\"details\":\"initializer should prevent this from being called again\",\"params\":{\"name_\":\"Name for ERC20 token trackers\",\"symbol_\":\"Symbol for ERC20 token trackers\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(address,uint256)\":{\"notice\":\"Baal-only function to burn loot.\"},\"getCurrentSnapshotId()\":{\"notice\":\"get current SnapshotId\"},\"mint(address,uint256)\":{\"notice\":\"Baal-only function to mint loot.\"},\"pause()\":{\"notice\":\"Baal-only function to pause shares.\"},\"setUp(string,string)\":{\"notice\":\"Configure loot - called by Baal on summon\"},\"snapshot()\":{\"notice\":\"Allows baal to create a snapshot\"},\"unpause()\":{\"notice\":\"Baal-only function to pause shares.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LootERC20.sol\":\"Loot\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0xb1d9e69cf8073efa574b31b1f840e20709139c19bfb27e60b16393d6073f3d42\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private constant _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n /**\\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\\n * However, to ensure consistency with the upgradeable transpiler, we will continue\\n * to reserve a slot.\\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfe1053f3a6ee4527cde96c8152b8b1dbb98774639a64e819087bc80e618d7f7f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./StorageSlotUpgradeable.sol\\\";\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n using StorageSlotUpgradeable for bytes32;\\n\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (unsafeAccess(array, mid).value > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getAddressSlot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getBytes32Slot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getUint256Slot();\\n }\\n}\\n\",\"keccak256\":\"0xc3821e9d41b2b19b612238b308dcc8f4ab46afcd0f6b3bd174e89789bbf59e26\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x798741e231b22b81e2dd2eddaaf8832dee4baf5cd8e2dbaa5c1dd12a1c053c4d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"contracts/LootERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\ncontract Loot is\\n ERC20SnapshotUpgradeable,\\n ERC20PermitUpgradeable,\\n PausableUpgradeable,\\n OwnableUpgradeable,\\n UUPSUpgradeable\\n{\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Configure loot - called by Baal on summon\\n /// @dev initializer should prevent this from being called again\\n /// @param name_ Name for ERC20 token trackers\\n /// @param symbol_ Symbol for ERC20 token trackers\\n function setUp(string memory name_, string memory symbol_)\\n external\\n initializer\\n {\\n require(bytes(name_).length != 0, \\\"loot: name empty\\\");\\n require(bytes(symbol_).length != 0, \\\"loot: symbol empty\\\");\\n\\n __ERC20_init(name_, symbol_);\\n __ERC20Permit_init(name_);\\n __Pausable_init();\\n __ERC20Snapshot_init();\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n /// @notice Allows baal to create a snapshot\\n function snapshot() external onlyOwner returns(uint256) {\\n return _snapshot();\\n }\\n\\n /// @notice get current SnapshotId\\n function getCurrentSnapshotId() external view returns (uint256) {\\n return _getCurrentSnapshotId();\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n /// @notice Baal-only function to mint loot.\\n /// @param recipient Address to receive loot\\n /// @param amount Amount to mint\\n function mint(address recipient, uint256 amount) external onlyOwner {\\n // can not be more than half the max because of totalsupply of loot and shares\\n require(totalSupply() + amount <= type(uint256).max / 2, \\\"loot: cap exceeded\\\");\\n _mint(recipient, amount);\\n }\\n\\n /// @notice Baal-only function to burn loot.\\n /// @param account Address to lose loot\\n /// @param amount Amount to burn\\n function burn(address account, uint256 amount) external onlyOwner {\\n _burn(account, amount);\\n }\\n\\n /// @notice Internal hook to restrict token transfers unless allowed by baal\\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\\n /// @param from The address of the source account.\\n /// @param to The address of the destination account.\\n /// @param amount The number of `loot` tokens to transfer.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n require(\\n from == address(0) || /*Minting allowed*/\\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\\n !paused(),\\n \\\"loot: !transferable\\\"\\n );\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0xa3b301421fabcf9fc110e5532cc4368c6e25a80348dbfe47f8e8e4dd72ce02cb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b6080523480156200001857600080fd5b506200002362000029565b620000eb565b600054610100900460ff1615620000965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c61288a62000126600039600081816106480152818161069101528181610838015281816108780152610907015261288a6000f3fe6080604052600436106101cd5760003560e01c80635c975abb116100f75780639711715a11610095578063a9059cbb11610064578063a9059cbb146104dc578063d505accf146104fc578063dd62ed3e1461051c578063f2fde38b1461053c57600080fd5b80639711715a14610467578063981b24d01461047c5780639dc29fac1461049c578063a457c2d7146104bc57600080fd5b80637ecebe00116100d15780637ecebe00146103f45780638456cb59146104145780638da5cb5b1461042957806395d89b411461045257600080fd5b80635c975abb1461039157806370a08231146103a9578063715018a6146103df57600080fd5b8063395093511161016f5780634f1ef2861161013e5780634f1ef2861461033457806352d1902d146103475780635439ad861461035c578063562d190d1461037157600080fd5b806339509351146102bf5780633f4ba83a146102df57806340c10f19146102f45780634ee2cd7e1461031457600080fd5b806323b872dd116101ab57806323b872dd1461024c578063313ce5671461026c5780633644e515146102885780633659cfe61461029d57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e761055c565b6040516101f491906125ed565b60405180910390f35b34801561020957600080fd5b5061021d61021836600461251b565b6105ee565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d61026736600461240a565b610608565b34801561027857600080fd5b50604051601281526020016101f4565b34801561029457600080fd5b5061023e61062e565b3480156102a957600080fd5b506102bd6102b83660046123bc565b61063d565b005b3480156102cb57600080fd5b5061021d6102da36600461251b565b610726565b3480156102eb57600080fd5b506102bd610748565b34801561030057600080fd5b506102bd61030f36600461251b565b61075a565b34801561032057600080fd5b5061023e61032f36600461251b565b6107d4565b6102bd6103423660046124b9565b61082d565b34801561035357600080fd5b5061023e6108fa565b34801561036857600080fd5b5061023e6109ad565b34801561037d57600080fd5b506102bd61038c36600461255e565b6109b7565b34801561039d57600080fd5b5060fe5460ff1661021d565b3480156103b557600080fd5b5061023e6103c43660046123bc565b6001600160a01b031660009081526033602052604090205490565b3480156103eb57600080fd5b506102bd610b79565b34801561040057600080fd5b5061023e61040f3660046123bc565b610b8b565b34801561042057600080fd5b506102bd610ba9565b34801561043557600080fd5b50610130546040516001600160a01b0390911681526020016101f4565b34801561045e57600080fd5b506101e7610bb9565b34801561047357600080fd5b5061023e610bc8565b34801561048857600080fd5b5061023e6104973660046125b8565b610bda565b3480156104a857600080fd5b506102bd6104b736600461251b565b610c05565b3480156104c857600080fd5b5061021d6104d736600461251b565b610c17565b3480156104e857600080fd5b5061021d6104f736600461251b565b610c9d565b34801561050857600080fd5b506102bd610517366004612446565b610cab565b34801561052857600080fd5b5061023e6105373660046123d7565b610e0f565b34801561054857600080fd5b506102bd6105573660046123bc565b610e3a565b60606036805461056b90612780565b80601f016020809104026020016040519081016040528092919081815260200182805461059790612780565b80156105e45780601f106105b9576101008083540402835291602001916105e4565b820191906000526020600020905b8154815290600101906020018083116105c757829003601f168201915b5050505050905090565b6000336105fc818585610eb0565b60019150505b92915050565b600033610616858285610fd4565b61062185858561104e565b60019150505b9392505050565b6000610638611204565b905090565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561068f5760405162461bcd60e51b815260040161068690612620565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106d860008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016106869061266c565b6107078161127f565b6040805160008082526020820190925261072391839190611287565b50565b6000336105fc8185856107398383610e0f565b6107439190612703565b610eb0565b610750611401565b61075861145c565b565b610762611401565b61076f600260001961271b565b8161077960355490565b6107839190612703565b11156107c65760405162461bcd60e51b81526020600482015260126024820152711b1bdbdd0e8818d85c08195e18d95959195960721b6044820152606401610686565b6107d082826114ae565b5050565b6001600160a01b0382166000908152606560205260408120819081906107fb90859061157b565b9150915081610822576001600160a01b038516600090815260336020526040902054610824565b805b95945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108765760405162461bcd60e51b815260040161068690612620565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108bf60008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146108e55760405162461bcd60e51b81526004016106869061266c565b6108ee8261127f565b6107d082826001611287565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610686565b5060008051602061280e83398151915290565b6000610638611672565b600054610100900460ff16158080156109d75750600054600160ff909116105b806109f15750303b1580156109f1575060005460ff166001145b610a545760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610686565b6000805460ff191660011790558015610a77576000805461ff0019166101001790555b8251610ab85760405162461bcd60e51b815260206004820152601060248201526f6c6f6f743a206e616d6520656d70747960801b6044820152606401610686565b8151610afb5760405162461bcd60e51b81526020600482015260126024820152716c6f6f743a2073796d626f6c20656d70747960701b6044820152606401610686565b610b05838361167d565b610b0e836116ae565b610b166116f8565b610b1e611727565b610b2661174e565b610b2e611727565b8015610b74576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610b81611401565b610758600061177d565b6001600160a01b038116600090815260cb6020526040812054610602565b610bb1611401565b6107586117d0565b60606037805461056b90612780565b6000610bd2611401565b61063861180d565b6000806000610bea84606661157b565b9150915081610bfb57603554610bfd565b805b949350505050565b610c0d611401565b6107d08282611867565b60003381610c258286610e0f565b905083811015610c855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610686565b610c928286868403610eb0565b506001949350505050565b6000336105fc81858561104e565b83421115610cfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610686565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d2a8c6119a7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d85826119cf565b90506000610d9582878787611a1d565b9050896001600160a01b0316816001600160a01b031614610df85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610686565b610e038a8a8a610eb0565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610e42611401565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610686565b6107238161177d565b6001600160a01b038316610f125760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610686565b6001600160a01b038216610f735760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610686565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fe08484610e0f565b90506000198114611048578181101561103b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610686565b6110488484848403610eb0565b50505050565b6001600160a01b0383166110b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610686565b6001600160a01b0382166111145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610686565b61111f838383611a45565b6001600160a01b038316600090815260336020526040902054818110156111975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610686565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111f79086815260200190565b60405180910390a3611048565b60006106387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61123360975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b610723611401565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156112ba57610b7483611ad3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f357600080fd5b505afa925050508015611323575060408051601f3d908101601f1916820190925261132091810190612545565b60015b6113865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610686565b60008051602061280e83398151915281146113f55760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610686565b50610b74838383611b6f565b610130546001600160a01b031633146107585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610686565b611464611b94565b60fe805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166115045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610686565b61151060008383611a45565b80603560008282546115229190612703565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080600084116115c75760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610686565b6115cf611672565b84111561161e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610686565b600061162a8486611bdd565b845490915081141561164357600080925092505061166b565b600184600101828154811061165a5761165a6127e1565b906000526020600020015492509250505b9250929050565b600061063860685490565b600054610100900460ff166116a45760405162461bcd60e51b8152600401610686906126b8565b6107d08282611c88565b600054610100900460ff166116d55760405162461bcd60e51b8152600401610686906126b8565b61072381604051806040016040528060018152602001603160f81b815250611cd6565b600054610100900460ff1661171f5760405162461bcd60e51b8152600401610686906126b8565b610758611d17565b600054610100900460ff166107585760405162461bcd60e51b8152600401610686906126b8565b600054610100900460ff166117755760405162461bcd60e51b8152600401610686906126b8565b610758611d4a565b61013080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117d8611d7a565b60fe805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114913390565b600061181d606880546001019055565b6000611827611672565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161185a91815260200190565b60405180910390a1919050565b6001600160a01b0382166118c75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610686565b6118d382600083611a45565b6001600160a01b038216600090815260336020526040902054818110156119475760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610686565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b60006106026119dc611204565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611a2e87878787611dc0565b91509150611a3b81611e84565b5095945050505050565b611a50838383611fd2565b6001600160a01b0383161580611a835750610130546001600160a01b031633148015611a8357506001600160a01b038216155b80611a91575060fe5460ff16155b610b745760405162461bcd60e51b81526020600482015260136024820152726c6f6f743a20217472616e7366657261626c6560681b6044820152606401610686565b6001600160a01b0381163b611b405760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610686565b60008051602061280e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611b788361201a565b600082511180611b855750805b15610b7457611048838361205a565b60fe5460ff166107585760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610686565b8154600090611bee57506000610602565b82546000905b80821015611c3b576000611c088383612145565b60008781526020902090915085908201541115611c2757809150611c35565b611c32816001612703565b92505b50611bf4565b600082118015611c67575083611c6486611c5660018661273d565b600091825260209091200190565b54145b15611c8057611c7760018361273d565b92505050610602565b509050610602565b600054610100900460ff16611caf5760405162461bcd60e51b8152600401610686906126b8565b8151611cc2906036906020850190612276565b508051610b74906037906020840190612276565b600054610100900460ff16611cfd5760405162461bcd60e51b8152600401610686906126b8565b815160209283012081519190920120609791909155609855565b600054610100900460ff16611d3e5760405162461bcd60e51b8152600401610686906126b8565b60fe805460ff19169055565b600054610100900460ff16611d715760405162461bcd60e51b8152600401610686906126b8565b6107583361177d565b60fe5460ff16156107585760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610686565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df75750600090506003611e7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e7457600060019250925050611e7b565b9150600090505b94509492505050565b6000816004811115611e9857611e986127cb565b1415611ea15750565b6001816004811115611eb557611eb56127cb565b1415611f035760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610686565b6002816004811115611f1757611f176127cb565b1415611f655760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610686565b6003816004811115611f7957611f796127cb565b14156107235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610686565b6001600160a01b038316611ff157611fe982612160565b610b74612193565b6001600160a01b03821661200857611fe983612160565b61201183612160565b610b7482612160565b61202381611ad3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6120c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610686565b600080846001600160a01b0316846040516120dd91906125d1565b600060405180830381855af49150503d8060008114612118576040519150601f19603f3d011682016040523d82523d6000602084013e61211d565b606091505b5091509150610824828260405180606001604052806027815260200161282e602791396121a1565b6000612154600284841861271b565b61062790848416612703565b6001600160a01b038116600090815260656020908152604080832060339092529091205461072391906121ba565b6121ba565b610758606661218e60355490565b606083156121b0575081610627565b6106278383612204565b60006121c4611672565b9050806121d08461222e565b1015610b74578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8151156122145781518083602001fd5b8060405162461bcd60e51b815260040161068691906125ed565b805460009061223f57506000919050565b8154829061224f9060019061273d565b8154811061225f5761225f6127e1565b90600052602060002001549050919050565b919050565b82805461228290612780565b90600052602060002090601f0160209004810192826122a457600085556122ea565b82601f106122bd57805160ff19168380011785556122ea565b828001600101855582156122ea579182015b828111156122ea5782518255916020019190600101906122cf565b506122f69291506122fa565b5090565b5b808211156122f657600081556001016122fb565b600067ffffffffffffffff8084111561232a5761232a6127f7565b604051601f8501601f19908116603f01168101908282118183101715612352576123526127f7565b8160405280935085815286868601111561236b57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461227157600080fd5b600082601f8301126123ad57600080fd5b6106278383356020850161230f565b6000602082840312156123ce57600080fd5b61062782612385565b600080604083850312156123ea57600080fd5b6123f383612385565b915061240160208401612385565b90509250929050565b60008060006060848603121561241f57600080fd5b61242884612385565b925061243660208501612385565b9150604084013590509250925092565b600080600080600080600060e0888a03121561246157600080fd5b61246a88612385565b965061247860208901612385565b95506040880135945060608801359350608088013560ff8116811461249c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156124cc57600080fd5b6124d583612385565b9150602083013567ffffffffffffffff8111156124f157600080fd5b8301601f8101851361250257600080fd5b6125118582356020840161230f565b9150509250929050565b6000806040838503121561252e57600080fd5b61253783612385565b946020939093013593505050565b60006020828403121561255757600080fd5b5051919050565b6000806040838503121561257157600080fd5b823567ffffffffffffffff8082111561258957600080fd5b6125958683870161239c565b935060208501359150808211156125ab57600080fd5b506125118582860161239c565b6000602082840312156125ca57600080fd5b5035919050565b600082516125e3818460208701612754565b9190910192915050565b602081526000825180602084015261260c816040850160208701612754565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115612716576127166127b5565b500190565b60008261273857634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561274f5761274f6127b5565b500390565b60005b8381101561276f578181015183820152602001612757565b838111156110485750506000910152565b600181811c9082168061279457607f821691505b602082108114156119c957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204196986f131ab75e482c8e8e87b668e2e5b20fa8d630b5bb7623e2871e6c4b6f64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80635c975abb116100f75780639711715a11610095578063a9059cbb11610064578063a9059cbb146104dc578063d505accf146104fc578063dd62ed3e1461051c578063f2fde38b1461053c57600080fd5b80639711715a14610467578063981b24d01461047c5780639dc29fac1461049c578063a457c2d7146104bc57600080fd5b80637ecebe00116100d15780637ecebe00146103f45780638456cb59146104145780638da5cb5b1461042957806395d89b411461045257600080fd5b80635c975abb1461039157806370a08231146103a9578063715018a6146103df57600080fd5b8063395093511161016f5780634f1ef2861161013e5780634f1ef2861461033457806352d1902d146103475780635439ad861461035c578063562d190d1461037157600080fd5b806339509351146102bf5780633f4ba83a146102df57806340c10f19146102f45780634ee2cd7e1461031457600080fd5b806323b872dd116101ab57806323b872dd1461024c578063313ce5671461026c5780633644e515146102885780633659cfe61461029d57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e761055c565b6040516101f491906125ed565b60405180910390f35b34801561020957600080fd5b5061021d61021836600461251b565b6105ee565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d61026736600461240a565b610608565b34801561027857600080fd5b50604051601281526020016101f4565b34801561029457600080fd5b5061023e61062e565b3480156102a957600080fd5b506102bd6102b83660046123bc565b61063d565b005b3480156102cb57600080fd5b5061021d6102da36600461251b565b610726565b3480156102eb57600080fd5b506102bd610748565b34801561030057600080fd5b506102bd61030f36600461251b565b61075a565b34801561032057600080fd5b5061023e61032f36600461251b565b6107d4565b6102bd6103423660046124b9565b61082d565b34801561035357600080fd5b5061023e6108fa565b34801561036857600080fd5b5061023e6109ad565b34801561037d57600080fd5b506102bd61038c36600461255e565b6109b7565b34801561039d57600080fd5b5060fe5460ff1661021d565b3480156103b557600080fd5b5061023e6103c43660046123bc565b6001600160a01b031660009081526033602052604090205490565b3480156103eb57600080fd5b506102bd610b79565b34801561040057600080fd5b5061023e61040f3660046123bc565b610b8b565b34801561042057600080fd5b506102bd610ba9565b34801561043557600080fd5b50610130546040516001600160a01b0390911681526020016101f4565b34801561045e57600080fd5b506101e7610bb9565b34801561047357600080fd5b5061023e610bc8565b34801561048857600080fd5b5061023e6104973660046125b8565b610bda565b3480156104a857600080fd5b506102bd6104b736600461251b565b610c05565b3480156104c857600080fd5b5061021d6104d736600461251b565b610c17565b3480156104e857600080fd5b5061021d6104f736600461251b565b610c9d565b34801561050857600080fd5b506102bd610517366004612446565b610cab565b34801561052857600080fd5b5061023e6105373660046123d7565b610e0f565b34801561054857600080fd5b506102bd6105573660046123bc565b610e3a565b60606036805461056b90612780565b80601f016020809104026020016040519081016040528092919081815260200182805461059790612780565b80156105e45780601f106105b9576101008083540402835291602001916105e4565b820191906000526020600020905b8154815290600101906020018083116105c757829003601f168201915b5050505050905090565b6000336105fc818585610eb0565b60019150505b92915050565b600033610616858285610fd4565b61062185858561104e565b60019150505b9392505050565b6000610638611204565b905090565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561068f5760405162461bcd60e51b815260040161068690612620565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106d860008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016106869061266c565b6107078161127f565b6040805160008082526020820190925261072391839190611287565b50565b6000336105fc8185856107398383610e0f565b6107439190612703565b610eb0565b610750611401565b61075861145c565b565b610762611401565b61076f600260001961271b565b8161077960355490565b6107839190612703565b11156107c65760405162461bcd60e51b81526020600482015260126024820152711b1bdbdd0e8818d85c08195e18d95959195960721b6044820152606401610686565b6107d082826114ae565b5050565b6001600160a01b0382166000908152606560205260408120819081906107fb90859061157b565b9150915081610822576001600160a01b038516600090815260336020526040902054610824565b805b95945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108765760405162461bcd60e51b815260040161068690612620565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108bf60008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146108e55760405162461bcd60e51b81526004016106869061266c565b6108ee8261127f565b6107d082826001611287565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610686565b5060008051602061280e83398151915290565b6000610638611672565b600054610100900460ff16158080156109d75750600054600160ff909116105b806109f15750303b1580156109f1575060005460ff166001145b610a545760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610686565b6000805460ff191660011790558015610a77576000805461ff0019166101001790555b8251610ab85760405162461bcd60e51b815260206004820152601060248201526f6c6f6f743a206e616d6520656d70747960801b6044820152606401610686565b8151610afb5760405162461bcd60e51b81526020600482015260126024820152716c6f6f743a2073796d626f6c20656d70747960701b6044820152606401610686565b610b05838361167d565b610b0e836116ae565b610b166116f8565b610b1e611727565b610b2661174e565b610b2e611727565b8015610b74576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610b81611401565b610758600061177d565b6001600160a01b038116600090815260cb6020526040812054610602565b610bb1611401565b6107586117d0565b60606037805461056b90612780565b6000610bd2611401565b61063861180d565b6000806000610bea84606661157b565b9150915081610bfb57603554610bfd565b805b949350505050565b610c0d611401565b6107d08282611867565b60003381610c258286610e0f565b905083811015610c855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610686565b610c928286868403610eb0565b506001949350505050565b6000336105fc81858561104e565b83421115610cfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610686565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d2a8c6119a7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d85826119cf565b90506000610d9582878787611a1d565b9050896001600160a01b0316816001600160a01b031614610df85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610686565b610e038a8a8a610eb0565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610e42611401565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610686565b6107238161177d565b6001600160a01b038316610f125760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610686565b6001600160a01b038216610f735760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610686565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fe08484610e0f565b90506000198114611048578181101561103b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610686565b6110488484848403610eb0565b50505050565b6001600160a01b0383166110b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610686565b6001600160a01b0382166111145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610686565b61111f838383611a45565b6001600160a01b038316600090815260336020526040902054818110156111975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610686565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111f79086815260200190565b60405180910390a3611048565b60006106387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61123360975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b610723611401565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156112ba57610b7483611ad3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f357600080fd5b505afa925050508015611323575060408051601f3d908101601f1916820190925261132091810190612545565b60015b6113865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610686565b60008051602061280e83398151915281146113f55760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610686565b50610b74838383611b6f565b610130546001600160a01b031633146107585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610686565b611464611b94565b60fe805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166115045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610686565b61151060008383611a45565b80603560008282546115229190612703565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080600084116115c75760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610686565b6115cf611672565b84111561161e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610686565b600061162a8486611bdd565b845490915081141561164357600080925092505061166b565b600184600101828154811061165a5761165a6127e1565b906000526020600020015492509250505b9250929050565b600061063860685490565b600054610100900460ff166116a45760405162461bcd60e51b8152600401610686906126b8565b6107d08282611c88565b600054610100900460ff166116d55760405162461bcd60e51b8152600401610686906126b8565b61072381604051806040016040528060018152602001603160f81b815250611cd6565b600054610100900460ff1661171f5760405162461bcd60e51b8152600401610686906126b8565b610758611d17565b600054610100900460ff166107585760405162461bcd60e51b8152600401610686906126b8565b600054610100900460ff166117755760405162461bcd60e51b8152600401610686906126b8565b610758611d4a565b61013080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117d8611d7a565b60fe805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114913390565b600061181d606880546001019055565b6000611827611672565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161185a91815260200190565b60405180910390a1919050565b6001600160a01b0382166118c75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610686565b6118d382600083611a45565b6001600160a01b038216600090815260336020526040902054818110156119475760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610686565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b60006106026119dc611204565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611a2e87878787611dc0565b91509150611a3b81611e84565b5095945050505050565b611a50838383611fd2565b6001600160a01b0383161580611a835750610130546001600160a01b031633148015611a8357506001600160a01b038216155b80611a91575060fe5460ff16155b610b745760405162461bcd60e51b81526020600482015260136024820152726c6f6f743a20217472616e7366657261626c6560681b6044820152606401610686565b6001600160a01b0381163b611b405760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610686565b60008051602061280e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611b788361201a565b600082511180611b855750805b15610b7457611048838361205a565b60fe5460ff166107585760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610686565b8154600090611bee57506000610602565b82546000905b80821015611c3b576000611c088383612145565b60008781526020902090915085908201541115611c2757809150611c35565b611c32816001612703565b92505b50611bf4565b600082118015611c67575083611c6486611c5660018661273d565b600091825260209091200190565b54145b15611c8057611c7760018361273d565b92505050610602565b509050610602565b600054610100900460ff16611caf5760405162461bcd60e51b8152600401610686906126b8565b8151611cc2906036906020850190612276565b508051610b74906037906020840190612276565b600054610100900460ff16611cfd5760405162461bcd60e51b8152600401610686906126b8565b815160209283012081519190920120609791909155609855565b600054610100900460ff16611d3e5760405162461bcd60e51b8152600401610686906126b8565b60fe805460ff19169055565b600054610100900460ff16611d715760405162461bcd60e51b8152600401610686906126b8565b6107583361177d565b60fe5460ff16156107585760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610686565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df75750600090506003611e7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e7457600060019250925050611e7b565b9150600090505b94509492505050565b6000816004811115611e9857611e986127cb565b1415611ea15750565b6001816004811115611eb557611eb56127cb565b1415611f035760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610686565b6002816004811115611f1757611f176127cb565b1415611f655760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610686565b6003816004811115611f7957611f796127cb565b14156107235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610686565b6001600160a01b038316611ff157611fe982612160565b610b74612193565b6001600160a01b03821661200857611fe983612160565b61201183612160565b610b7482612160565b61202381611ad3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6120c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610686565b600080846001600160a01b0316846040516120dd91906125d1565b600060405180830381855af49150503d8060008114612118576040519150601f19603f3d011682016040523d82523d6000602084013e61211d565b606091505b5091509150610824828260405180606001604052806027815260200161282e602791396121a1565b6000612154600284841861271b565b61062790848416612703565b6001600160a01b038116600090815260656020908152604080832060339092529091205461072391906121ba565b6121ba565b610758606661218e60355490565b606083156121b0575081610627565b6106278383612204565b60006121c4611672565b9050806121d08461222e565b1015610b74578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8151156122145781518083602001fd5b8060405162461bcd60e51b815260040161068691906125ed565b805460009061223f57506000919050565b8154829061224f9060019061273d565b8154811061225f5761225f6127e1565b90600052602060002001549050919050565b919050565b82805461228290612780565b90600052602060002090601f0160209004810192826122a457600085556122ea565b82601f106122bd57805160ff19168380011785556122ea565b828001600101855582156122ea579182015b828111156122ea5782518255916020019190600101906122cf565b506122f69291506122fa565b5090565b5b808211156122f657600081556001016122fb565b600067ffffffffffffffff8084111561232a5761232a6127f7565b604051601f8501601f19908116603f01168101908282118183101715612352576123526127f7565b8160405280935085815286868601111561236b57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461227157600080fd5b600082601f8301126123ad57600080fd5b6106278383356020850161230f565b6000602082840312156123ce57600080fd5b61062782612385565b600080604083850312156123ea57600080fd5b6123f383612385565b915061240160208401612385565b90509250929050565b60008060006060848603121561241f57600080fd5b61242884612385565b925061243660208501612385565b9150604084013590509250925092565b600080600080600080600060e0888a03121561246157600080fd5b61246a88612385565b965061247860208901612385565b95506040880135945060608801359350608088013560ff8116811461249c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156124cc57600080fd5b6124d583612385565b9150602083013567ffffffffffffffff8111156124f157600080fd5b8301601f8101851361250257600080fd5b6125118582356020840161230f565b9150509250929050565b6000806040838503121561252e57600080fd5b61253783612385565b946020939093013593505050565b60006020828403121561255757600080fd5b5051919050565b6000806040838503121561257157600080fd5b823567ffffffffffffffff8082111561258957600080fd5b6125958683870161239c565b935060208501359150808211156125ab57600080fd5b506125118582860161239c565b6000602082840312156125ca57600080fd5b5035919050565b600082516125e3818460208701612754565b9190910192915050565b602081526000825180602084015261260c816040850160208701612754565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115612716576127166127b5565b500190565b60008261273857634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561274f5761274f6127b5565b500390565b60005b8381101561276f578181015183820152602001612757565b838111156110485750506000910152565b600181811c9082168061279457607f821691505b602082108114156119c957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204196986f131ab75e482c8e8e87b668e2e5b20fa8d630b5bb7623e2871e6c4b6f64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "balanceOfAt(address,uint256)": { + "details": "Retrieves the balance of `account` at the time `snapshotId` was created." + }, + "burn(address,uint256)": { + "params": { + "account": "Address to lose loot", + "amount": "Amount to burn" + } + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "params": { + "amount": "Amount to mint", + "recipient": "Address to receive loot" + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(string,string)": { + "details": "initializer should prevent this from being called again", + "params": { + "name_": "Name for ERC20 token trackers", + "symbol_": "Symbol for ERC20 token trackers" + } + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "totalSupplyAt(uint256)": { + "details": "Retrieves the total supply at the time `snapshotId` was created." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burn(address,uint256)": { + "notice": "Baal-only function to burn loot." + }, + "getCurrentSnapshotId()": { + "notice": "get current SnapshotId" + }, + "mint(address,uint256)": { + "notice": "Baal-only function to mint loot." + }, + "pause()": { + "notice": "Baal-only function to pause shares." + }, + "setUp(string,string)": { + "notice": "Configure loot - called by Baal on summon" + }, + "snapshot()": { + "notice": "Allows baal to create a snapshot" + }, + "unpause()": { + "notice": "Baal-only function to pause shares." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4971, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 4977, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 4979, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 4981, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 4983, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 5563, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 5685, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_address,t_struct(Snapshots)5680_storage)" + }, + { + "astId": 5688, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "102", + "type": "t_struct(Snapshots)5680_storage" + }, + { + "astId": 5691, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_currentSnapshotId", + "offset": 0, + "slot": "104", + "type": "t_struct(Counter)6730_storage" + }, + { + "astId": 5989, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "105", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 7403, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6041, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)6730_storage)" + }, + { + "astId": 6049, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32" + }, + { + "astId": 6205, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4773, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_paused", + "offset": 0, + "slot": "254", + "type": "t_bool" + }, + { + "astId": 4878, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3937, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_owner", + "offset": 0, + "slot": "304", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)6730_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)6730_storage" + }, + "t_mapping(t_address,t_struct(Snapshots)5680_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20SnapshotUpgradeable.Snapshots)", + "numberOfBytes": "32", + "value": "t_struct(Snapshots)5680_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)6730_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 6729, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Snapshots)5680_storage": { + "encoding": "inplace", + "label": "struct ERC20SnapshotUpgradeable.Snapshots", + "members": [ + { + "astId": 5676, + "contract": "contracts/LootERC20.sol:Loot", + "label": "ids", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 5679, + "contract": "contracts/LootERC20.sol:Loot", + "label": "values", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/Shares.json b/deployments/base/Shares.json new file mode 100644 index 0000000..f2ed98f --- /dev/null +++ b/deployments/base/Shares.json @@ -0,0 +1,1624 @@ +{ + "address": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "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": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromTimePoint", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "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": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegationNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nCheckpoints", + "type": "uint256" + } + ], + "name": "getCheckpoint", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromTimePoint", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "internalType": "struct BaalVotes.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timePoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "votes", + "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": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "now", + "outputs": [ + { + "internalType": "uint256", + "name": "timePoint", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "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" + } + ], + "transactionHash": "0xd00490e9a98f1523ec182f9cd4e937d650eba6cd41cc4505838be89928c6f21b", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "transactionIndex": 2, + "gasUsed": "2949839", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000001000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000002000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6b11afcac3773ef2ff987e5e3a0cfbd4d933c44461100c0ba6ecc9ec0b2b994e", + "transactionHash": "0xd00490e9a98f1523ec182f9cd4e937d650eba6cd41cc4505838be89928c6f21b", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 7428452, + "transactionHash": "0xd00490e9a98f1523ec182f9cd4e937d650eba6cd41cc4505838be89928c6f21b", + "address": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 12, + "blockHash": "0x6b11afcac3773ef2ff987e5e3a0cfbd4d933c44461100c0ba6ecc9ec0b2b994e" + } + ], + "blockNumber": 7428452, + "cumulativeGasUsed": "3311509", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromTimePoint\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"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\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegationNonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nCheckpoints\",\"type\":\"uint256\"}],\"name\":\"getCheckpoint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromTimePoint\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"internalType\":\"struct BaalVotes.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSnapshotId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timePoint\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"votes\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"now\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timePoint\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"burn(address,uint256)\":{\"params\":{\"account\":\"Address to lose shares\",\"amount\":\"Amount to burn\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to.\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate 'votes' to.\",\"expiry\":\"The time at which to expire the signature.\",\"nonce\":\"The contract state required to match the signature.\",\"r\":\"The r signature\",\"s\":\"The s signature\",\"v\":\"The v signature\"}},\"getPastVotes(address,uint256)\":{\"params\":{\"account\":\"The user to check `votes` for.\",\"timePoint\":\"The unix time to check `votes` for.\"},\"returns\":{\"votes\":\"Past `votes` delegated to `account`.\"}},\"getVotes(address)\":{\"params\":{\"account\":\"The user to check delegated `votes` for.\"},\"returns\":{\"votes\":\"Current `votes` delegated to `account`.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"params\":{\"amount\":\"Amount to mint\",\"recipient\":\"Address to receive shares\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"now()\":{\"returns\":{\"timePoint\":\"returns unix epoch timestamp\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(string,string)\":{\"details\":\"initializer should prevent this from being called again\",\"params\":{\"name_\":\"Name for ERC20 token trackers\",\"symbol_\":\"Symbol for ERC20 token trackers\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Shares\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(address,uint256)\":{\"notice\":\"Baal-only function to burn shares.\"},\"delegate(address)\":{\"notice\":\"Delegate votes from user to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from `signer` to `delegatee` with EIP-712 signature.\"},\"getCurrentSnapshotId()\":{\"notice\":\"get current SnapshotId\"},\"getPastVotes(address,uint256)\":{\"notice\":\"Returns the prior number of `votes` for `account` as of `timePoint`.\"},\"getVotes(address)\":{\"notice\":\"Returns the current delegated `vote` balance for `account`.\"},\"mint(address,uint256)\":{\"notice\":\"Baal-only function to mint shares.\"},\"now()\":{\"notice\":\"Returns the current timepoint.\"},\"pause()\":{\"notice\":\"Baal-only function to pause shares.\"},\"setUp(string,string)\":{\"notice\":\"Configure shares - called by Baal on summon\"},\"snapshot()\":{\"notice\":\"Allows baal to create a snapshot\"},\"unpause()\":{\"notice\":\"Baal-only function to unpause shares.\"}},\"notice\":\"Accounting for Baal non voting shares\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SharesERC20.sol\":\"Shares\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0xb1d9e69cf8073efa574b31b1f840e20709139c19bfb27e60b16393d6073f3d42\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private constant _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n /**\\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\\n * However, to ensure consistency with the upgradeable transpiler, we will continue\\n * to reserve a slot.\\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfe1053f3a6ee4527cde96c8152b8b1dbb98774639a64e819087bc80e618d7f7f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./StorageSlotUpgradeable.sol\\\";\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n using StorageSlotUpgradeable for bytes32;\\n\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (unsafeAccess(array, mid).value > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getAddressSlot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getBytes32Slot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getUint256Slot();\\n }\\n}\\n\",\"keccak256\":\"0xc3821e9d41b2b19b612238b308dcc8f4ab46afcd0f6b3bd174e89789bbf59e26\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x798741e231b22b81e2dd2eddaaf8832dee4baf5cd8e2dbaa5c1dd12a1c053c4d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/SharesERC20.sol\":{\"content\":\"pragma solidity 0.8.7;\\n//SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\n\\nimport \\\"./utils/BaalVotes.sol\\\";\\nimport \\\"./interfaces/IBaal.sol\\\";\\n\\n// import \\\"hardhat/console.sol\\\";\\n\\n/// @title Shares\\n/// @notice Accounting for Baal non voting shares\\ncontract Shares is BaalVotes, ERC20SnapshotUpgradeable, OwnableUpgradeable, PausableUpgradeable, UUPSUpgradeable {\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Configure shares - called by Baal on summon\\n /// @dev initializer should prevent this from being called again\\n /// @param name_ Name for ERC20 token trackers\\n /// @param symbol_ Symbol for ERC20 token trackers\\n function setUp(string memory name_, string memory symbol_)\\n external\\n initializer\\n {\\n require(bytes(name_).length != 0, \\\"shares: name empty\\\");\\n require(bytes(symbol_).length != 0, \\\"shares: symbol empty\\\");\\n\\n __ERC20_init(name_, symbol_);\\n __ERC20Permit_init(name_);\\n __Pausable_init();\\n __ERC20Snapshot_init();\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n __EIP712_init_delegation(\\\"delegation\\\", \\\"4\\\");\\n\\n\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n /// @notice Baal-only function to unpause shares.\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n /// @notice Allows baal to create a snapshot\\n function snapshot() external onlyOwner returns(uint256) {\\n return _snapshot();\\n }\\n\\n /// @notice get current SnapshotId\\n function getCurrentSnapshotId() external view returns (uint256) {\\n return _getCurrentSnapshotId();\\n }\\n\\n /// @notice Baal-only function to mint shares.\\n /// @param recipient Address to receive shares\\n /// @param amount Amount to mint\\n function mint(address recipient, uint256 amount) external onlyOwner {\\n // can not be more than half the max because of totalsupply of loot and shares\\n require(totalSupply() + amount <= type(uint256).max / 2, \\\"shares: cap exceeded\\\");\\n _mint(recipient, amount);\\n }\\n\\n /// @notice Baal-only function to burn shares.\\n /// @param account Address to lose shares\\n /// @param amount Amount to burn\\n function burn(address account, uint256 amount) external onlyOwner {\\n _burn(account, amount);\\n }\\n\\n /// @notice Internal hook to restrict token transfers unless allowed by baal\\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\\n /// @param from The address of the source account.\\n /// @param to The address of the destination account.\\n /// @param amount The number of `shares` tokens to transfer.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(BaalVotes, ERC20SnapshotUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n require(\\n from == address(0) || /*Minting allowed*/\\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\\n !paused(),\\n \\\"shares: !transferable\\\"\\n );\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x01a30f13f538ee4d7e448aa984e10f24a18d7a35e9e45ab3b501364516f0725d\",\"license\":\"MIT\"},\"contracts/interfaces/IBaal.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaal {\\n function lootToken() external view returns (address);\\n function sharesToken() external view returns (address);\\n function votingPeriod() external view returns (uint32);\\n function gracePeriod() external view returns (uint32);\\n function proposalCount() external view returns (uint32);\\n function proposalOffering() external view returns (uint256);\\n function quorumPercent() external view returns (uint256);\\n function sponsorThreshold() external view returns (uint256);\\n function minRetentionPercent() external view returns (uint256);\\n function latestSponsoredProposalId() external view returns (uint32);\\n\\n function setUp(bytes memory initializationParams) external;\\n function multisendLibrary() external view returns (address);\\n // Module\\n function avatar() external view returns (address);\\n function target() external view returns (address);\\n function setAvatar(address avatar) external;\\n function setTarget(address avatar) external;\\n // BaseRelayRecipient\\n function trustedForwarder() external view returns (address);\\n function setTrustedForwarder(address trustedForwarderAddress) external;\\n\\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\\n function totalLoot() external view returns (uint256);\\n function totalShares() external view returns (uint256);\\n function totalSupply() external view returns (uint256);\\n function lootPaused() external view returns (bool);\\n function sharesPaused() external view returns (bool);\\n \\n function shamans(address shaman) external view returns (uint256);\\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\\n function isAdmin(address shaman) external view returns (bool);\\n function isManager(address shaman) external view returns (bool);\\n function isGovernor(address shaman) external view returns (bool);\\n function lockAdmin() external;\\n function lockManager() external;\\n function lockGovernor() external;\\n function adminLock() external view returns (bool);\\n function managerLock() external view returns (bool);\\n function governorLock() external view returns (bool);\\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\\n function setGovernanceConfig(bytes memory governanceConfig) external;\\n\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable returns (uint256);\\n function sponsorProposal(uint32 id) external;\\n function processProposal(uint32 id, bytes calldata proposalData) external;\\n function cancelProposal(uint32 id) external;\\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\\n function submitVote(uint32 id, bool approved) external;\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\\n\\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xa8e49237a041f30caf45f9999fe28fdaac6a847530f411761a9b493022622948\",\"license\":\"MIT\"},\"contracts/utils/BaalVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"./DelegationEIP712Upgradeable.sol\\\";\\n\\n/**\\n * @dev similar to Openzeplin ERC20Votes\\n *\\n * uses timestamp instead of block.number and auto self delegates.\\n *\\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\\n * power can be queried through the public accessors {getPriorVotes}.\\n *\\n */\\nabstract contract BaalVotes is ERC20PermitUpgradeable, DelegationEIP712Upgradeable {\\n using ECDSAUpgradeable for bytes32;\\n\\n struct Checkpoint {\\n /*Baal checkpoint for marking number of delegated votes*/\\n uint32 fromTimePoint; /*unix time for referencing voting balance*/\\n uint256 votes; /*votes at given unix time*/\\n }\\n\\n // DELEGATE TRACKING\\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints; /*maps record of vote `checkpoints` for each account by index*/\\n mapping(address => uint256) public numCheckpoints; /*maps number of `checkpoints` for each account*/\\n mapping(address => address) public delegates; /*maps record of each account's `shares` delegate*/\\n mapping(address => uint256) public delegationNonces; /*nonces for delegating by signature*/\\n\\n // SIGNATURE HELPERS\\n bytes32 constant DELEGATION_TYPEHASH = keccak256(\\\"Delegation(string name,address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n event DelegateChanged(\\n address indexed delegator,\\n address indexed fromDelegate,\\n address indexed toDelegate\\n ); /*emits when an account changes its voting delegate*/\\n event DelegateVotesChanged(\\n address indexed delegate,\\n uint256 previousBalance,\\n uint256 newBalance\\n ); /*emits when a delegate account's voting balance changes*/\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n /*If recipient is receiving their first shares, auto-self delegate*/\\n if (balanceOf(to) == 0 && numCheckpoints[to] == 0 && amount > 0) {\\n delegates[to] = to;\\n }\\n\\n _moveDelegates(delegates[from], delegates[to], amount);\\n }\\n\\n /// @notice Delegate votes from user to `delegatee`.\\n /// @param delegatee The address to delegate votes to.\\n function delegate(address delegatee) external virtual {\\n _delegate(msg.sender, delegatee);\\n }\\n\\n /// @notice Delegates votes from `signer` to `delegatee` with EIP-712 signature.\\n /// @param delegatee The address to delegate 'votes' to.\\n /// @param nonce The contract state required to match the signature.\\n /// @param expiry The time at which to expire the signature.\\n /// @param v The v signature\\n /// @param r The r signature\\n /// @param s The s signature\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public {\\n require(now() <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4Delegation(\\n keccak256(\\n abi.encode(\\n DELEGATION_TYPEHASH,\\n keccak256(abi.encodePacked(name())),\\n delegatee,\\n nonce,\\n expiry\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n require(signer != address(0), \\\"ERC20Votes: invalid signer (0x0)\\\");\\n require(nonce == delegationNonces[signer], \\\"ERC20Votes: invalid nonce\\\");\\n\\n delegationNonces[signer]++;\\n _delegate(signer, delegatee);\\n }\\n\\n /// @notice Delegates Baal voting weight.\\n /// @param delegator The address to delegate 'votes' from.\\n /// @param delegatee The address to delegate 'votes' to.\\n function _delegate(address delegator, address delegatee) internal virtual {\\n require(balanceOf(delegator) > 0, \\\"!shares\\\");\\n address currentDelegate = delegates[delegator];\\n delegates[delegator] = delegatee;\\n\\n _moveDelegates(\\n currentDelegate,\\n delegatee,\\n uint256(balanceOf(delegator))\\n );\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n }\\n\\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\\n /// @param srcRep The address to delegate 'votes' from.\\n /// @param dstRep The address to delegate 'votes' to.\\n /// @param amount The amount of votes to delegate\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint256 amount\\n ) private {\\n unchecked {\\n if (srcRep != dstRep && amount != 0) {\\n if (srcRep != address(0)) {\\n uint256 srcRepNum = numCheckpoints[srcRep];\\n uint256 srcRepOld = srcRepNum != 0\\n ? getCheckpoint(srcRep, srcRepNum - 1).votes\\n : 0;\\n uint256 srcRepNew = srcRepOld - amount;\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n\\n if (dstRep != address(0)) {\\n uint256 dstRepNum = numCheckpoints[dstRep];\\n uint256 dstRepOld = dstRepNum != 0\\n ? getCheckpoint(dstRep, dstRepNum - 1).votes\\n : 0;\\n uint256 dstRepNew = dstRepOld + amount;\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n }\\n\\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\\n /// @param delegatee The address to snapshot\\n /// @param nCheckpoints The number of checkpoints delegatee has\\n /// @param oldVotes The number of votes the delegatee had\\n /// @param newVotes The number of votes the delegate has now\\n function _writeCheckpoint(\\n address delegatee,\\n uint256 nCheckpoints,\\n uint256 oldVotes,\\n uint256 newVotes\\n ) private {\\n uint32 timePoint = uint32(now());\\n\\n unchecked {\\n if (\\n nCheckpoints != 0 &&\\n checkpoints[delegatee][nCheckpoints - 1].fromTimePoint == timePoint\\n ) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(\\n timePoint,\\n newVotes\\n );\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /// @notice Returns the current timepoint.\\n /// @return timePoint returns unix epoch timestamp\\n function now() public view returns (uint256 timePoint) {\\n return block.timestamp;\\n }\\n\\n /// @notice Returns the prior number of `votes` for `account` as of `timePoint`.\\n /// @param account The user to check `votes` for.\\n /// @param timePoint The unix time to check `votes` for.\\n /// @return votes Past `votes` delegated to `account`.\\n function getPastVotes(address account, uint256 timePoint)\\n external\\n view\\n virtual\\n returns (uint256 votes)\\n {\\n require(timePoint < now(), \\\"!determined\\\"); /* Prior votes must be in the past*/\\n\\n uint256 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) return 0;\\n\\n unchecked {\\n if (\\n getCheckpoint(account, nCheckpoints - 1).fromTimePoint <=\\n timePoint\\n ) return getCheckpoint(account, nCheckpoints - 1).votes; /* If most recent checkpoint is at or after desired timepoint, return*/\\n if (getCheckpoint(account, 0).fromTimePoint > timePoint) return 0;\\n uint256 lower = 0;\\n uint256 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n /* Binary search to look for highest timePoint before desired timePoint*/\\n uint256 center = upper - (upper - lower) / 2;\\n Checkpoint memory cp = getCheckpoint(account, center);\\n if (cp.fromTimePoint == timePoint) return cp.votes;\\n else if (cp.fromTimePoint < timePoint) lower = center;\\n else upper = center - 1;\\n }\\n votes = getCheckpoint(account, lower).votes;\\n }\\n }\\n\\n /// @notice Returns the current delegated `vote` balance for `account`.\\n /// @param account The user to check delegated `votes` for.\\n /// @return votes Current `votes` delegated to `account`.\\n function getVotes(address account)\\n external\\n view\\n virtual\\n returns (uint256 votes)\\n {\\n uint256 nCheckpoints = numCheckpoints[account]; /*Get most recent checkpoint, or 0 if no checkpoints*/\\n unchecked {\\n votes = nCheckpoints != 0\\n ? getCheckpoint(account, nCheckpoints - 1).votes\\n : 0;\\n }\\n }\\n\\n function getCheckpoint(address delegatee, uint256 nCheckpoints)\\n public\\n view\\n virtual\\n returns (Checkpoint memory)\\n {\\n return checkpoints[delegatee][nCheckpoints];\\n }\\n}\\n\",\"keccak256\":\"0x2003d3afd190a6c73b8e29970cdd84f0deb9bc543ed63d058451020293486348\",\"license\":\"MIT\"},\"contracts/utils/DelegationEIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4Delegation}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract DelegationEIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME_DELEGATION;\\n bytes32 private _HASHED_VERSION_DELEGATION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained_delegation(name, version);\\n }\\n\\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME_DELEGATION = hashedName;\\n _HASHED_VERSION_DELEGATION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\\n }\\n\\n function _buildDomainSeparatorDelegation(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\\n return _HASHED_NAME_DELEGATION;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION_DELEGATION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xaaca6373c8a75310ffcbbd63e8d0689ab6e404c96366e3fa4158bd3957924089\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b6080523480156200001857600080fd5b506200002362000029565b620000eb565b600054610100900460ff1615620000965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c6133ef6200012660003960008181610891015281816108da01528181610c1801528181610c580152610ce701526133ef6000f3fe60806040526004361061023b5760003560e01c80635c19a95c1161012e5780639711715a116100ab578063a9059cbb1161006f578063a9059cbb14610705578063c3cda52014610725578063d505accf14610745578063dd62ed3e14610765578063f2fde38b1461078557600080fd5b80639711715a14610670578063981b24d0146106855780639ab24eb0146106a55780639dc29fac146106c5578063a457c2d7146106e557600080fd5b80637ecebe00116100f25780637ecebe00146105f45780638456cb59146106145780638abe09f2146106295780638da5cb5b1461063c57806395d89b411461065b57600080fd5b80635c19a95c146105425780635c975abb146105625780636fcfff451461057b57806370a08231146105a9578063715018a6146105df57600080fd5b80633a46b1a8116101bc5780634f1ef286116101805780634f1ef2861461049657806352d1902d146104a95780635439ad86146104be578063562d190d146104d3578063587cde1e146104f357600080fd5b80633a46b1a8146103e05780633f4ba83a1461040057806340c10f191461041557806347f761f5146104355780634ee2cd7e1461047657600080fd5b806323b872dd1161020357806323b872dd1461034d578063313ce5671461036d5780633644e515146103895780633659cfe61461039e57806339509351146103c057600080fd5b806303c8a3c61461024057806306fdde0314610281578063095ea7b3146102a35780630cdfebfa146102d357806318160ddd14610338575b600080fd5b34801561024c57600080fd5b5061026e61025b366004612eb7565b6101036020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561028d57600080fd5b506102966107a5565b6040516102789190613137565b3480156102af57600080fd5b506102c36102be36600461300d565b610837565b6040519015158152602001610278565b3480156102df57600080fd5b5061031c6102ee36600461300d565b6101006020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff9093168352602083019190915201610278565b34801561034457600080fd5b5060355461026e565b34801561035957600080fd5b506102c3610368366004612f05565b610851565b34801561037957600080fd5b5060405160128152602001610278565b34801561039557600080fd5b5061026e610877565b3480156103aa57600080fd5b506103be6103b9366004612eb7565b610886565b005b3480156103cc57600080fd5b506102c36103db36600461300d565b61096f565b3480156103ec57600080fd5b5061026e6103fb36600461300d565b610991565b34801561040c57600080fd5b506103be610ad2565b34801561042157600080fd5b506103be61043036600461300d565b610ae4565b34801561044157600080fd5b5061045561045036600461300d565b610b60565b60408051825163ffffffff1681526020928301519281019290925201610278565b34801561048257600080fd5b5061026e61049136600461300d565b610bb3565b6103be6104a4366004612fab565b610c0d565b3480156104b557600080fd5b5061026e610cda565b3480156104ca57600080fd5b5061026e610d8d565b3480156104df57600080fd5b506103be6104ee3660046130a8565b610d97565b3480156104ff57600080fd5b5061052a61050e366004612eb7565b610102602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b34801561054e57600080fd5b506103be61055d366004612eb7565b610fa2565b34801561056e57600080fd5b506101685460ff166102c3565b34801561058757600080fd5b5061026e610596366004612eb7565b6101016020526000908152604090205481565b3480156105b557600080fd5b5061026e6105c4366004612eb7565b6001600160a01b031660009081526033602052604090205490565b3480156105eb57600080fd5b506103be610fac565b34801561060057600080fd5b5061026e61060f366004612eb7565b610fbe565b34801561062057600080fd5b506103be610fdc565b34801561063557600080fd5b504261026e565b34801561064857600080fd5b50610136546001600160a01b031661052a565b34801561066757600080fd5b50610296610fec565b34801561067c57600080fd5b5061026e610ffb565b34801561069157600080fd5b5061026e6106a0366004613102565b61100d565b3480156106b157600080fd5b5061026e6106c0366004612eb7565b611039565b3480156106d157600080fd5b506103be6106e036600461300d565b611077565b3480156106f157600080fd5b506102c361070036600461300d565b611089565b34801561071157600080fd5b506102c361072036600461300d565b61110f565b34801561073157600080fd5b506103be610740366004613037565b61111d565b34801561075157600080fd5b506103be610760366004612f41565b611313565b34801561077157600080fd5b5061026e610780366004612ed2565b611477565b34801561079157600080fd5b506103be6107a0366004612eb7565b6114a2565b6060603680546107b4906132ca565b80601f01602080910402602001604051908101604052809291908181526020018280546107e0906132ca565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b5050505050905090565b600033610845818585611518565b60019150505b92915050565b60003361085f85828561163c565b61086a8585856116b6565b60019150505b9392505050565b600061088161186c565b905090565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108d85760405162461bcd60e51b81526004016108cf9061316a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610921600080516020613373833981519152546001600160a01b031690565b6001600160a01b0316146109475760405162461bcd60e51b81526004016108cf906131b6565b610950816118a3565b6040805160008082526020820190925261096c918391906118ab565b50565b6000336108458185856109828383611477565b61098c919061324d565b611518565b60004282106109d05760405162461bcd60e51b815260206004820152600b60248201526a0859195d195c9b5a5b995960aa1b60448201526064016108cf565b6001600160a01b03831660009081526101016020526040902054806109f957600091505061084b565b82610a078560018403610b60565b5163ffffffff1611610a2c57610a208460018303610b60565b6020015191505061084b565b82610a38856000610b60565b5163ffffffff161115610a4f57600091505061084b565b600060001982015b81811115610aba5760028282030481036000610a738883610b60565b805190915063ffffffff16871415610a955760200151945061084b9350505050565b805163ffffffff16871115610aac57819350610ab3565b6001820392505b5050610a57565b610ac48683610b60565b602001519695505050505050565b610ada611a25565b610ae2611a80565b565b610aec611a25565b610af96002600019613265565b81610b0360355490565b610b0d919061324d565b1115610b525760405162461bcd60e51b81526020600482015260146024820152731cda185c995cce8818d85c08195e18d95959195960621b60448201526064016108cf565b610b5c8282611ad3565b5050565b604080518082018252600080825260209182018190526001600160a01b039490941684526101008152818420928452918252918290208251808401909352805463ffffffff168352600101549082015290565b6001600160a01b03821660009081526101046020526040812081908190610bdb908590611ba0565b9150915081610c02576001600160a01b038516600090815260336020526040902054610c04565b805b95945050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610c565760405162461bcd60e51b81526004016108cf9061316a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c9f600080516020613373833981519152546001600160a01b031690565b6001600160a01b031614610cc55760405162461bcd60e51b81526004016108cf906131b6565b610cce826118a3565b610b5c828260016118ab565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d7a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108cf565b5060008051602061337383398151915290565b6000610881611c97565b600054610100900460ff1615808015610db75750600054600160ff909116105b80610dd15750303b158015610dd1575060005460ff166001145b610e345760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108cf565b6000805460ff191660011790558015610e57576000805461ff0019166101001790555b8251610e9a5760405162461bcd60e51b81526020600482015260126024820152717368617265733a206e616d6520656d70747960701b60448201526064016108cf565b8151610edf5760405162461bcd60e51b81526020600482015260146024820152737368617265733a2073796d626f6c20656d70747960601b60448201526064016108cf565b610ee98383611ca3565b610ef283611cd4565b610efa611d1e565b610f02611d4d565b610f0a611d74565b610f12611d4d565b610f576040518060400160405280600a8152602001693232b632b3b0ba34b7b760b11b815250604051806040016040528060018152602001600d60fa1b815250611da3565b8015610f9d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61096c3382611dd4565b610fb4611a25565b610ae26000611ecb565b6001600160a01b03811660009081526099602052604081205461084b565b610fe4611a25565b610ae2611f1e565b6060603780546107b4906132ca565b6000611005611a25565b610881611f5c565b600080600061101e84610105611ba0565b915091508161102f57603554611031565b805b949350505050565b6001600160a01b038116600090815261010160205260408120548061105f576000610870565b61106c8360018303610b60565b602001519392505050565b61107f611a25565b610b5c8282611fb7565b600033816110978286611477565b9050838110156110f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108cf565b6111048286868403611518565b506001949350505050565b6000336108458185856116b6565b8342111561116d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016108cf565b600061121661120e7f0e3bc21ca2be03aeeee0e614bfe98f970c96a05a768f627c50ab81764cb5026861119e6107a5565b6040516020016111ae919061311b565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905260c001604051602081830303815290604052805190602001206120f7565b858585612145565b90506001600160a01b03811661126e5760405162461bcd60e51b815260206004820181905260248201527f4552433230566f7465733a20696e76616c6964207369676e657220283078302960448201526064016108cf565b6001600160a01b0381166000908152610103602052604090205486146112d65760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016108cf565b6001600160a01b0381166000908152610103602052604081208054916112fb836132ff565b919050555061130a8188611dd4565b50505050505050565b834211156113635760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016108cf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113928c61216d565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006113ed82612195565b905060006113fd82878787612145565b9050896001600160a01b0316816001600160a01b0316146114605760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016108cf565b61146b8a8a8a611518565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6114aa611a25565b6001600160a01b03811661150f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108cf565b61096c81611ecb565b6001600160a01b03831661157a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108cf565b6001600160a01b0382166115db5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108cf565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006116488484611477565b905060001981146116b057818110156116a35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108cf565b6116b08484848403611518565b50505050565b6001600160a01b03831661171a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108cf565b6001600160a01b03821661177c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108cf565b6117878383836121a2565b6001600160a01b038316600090815260336020526040902054818110156117ff5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108cf565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061185f9086815260200190565b60405180910390a36116b0565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61189b60655490565b606654612233565b61096c611a25565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156118de57610f9d8361227c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191757600080fd5b505afa925050508015611947575060408051601f3d908101601f191682019092526119449181019061308f565b60015b6119aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016108cf565b6000805160206133738339815191528114611a195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016108cf565b50610f9d838383612318565b610136546001600160a01b03163314610ae25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108cf565b611a8861233d565b610168805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b295760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108cf565b611b35600083836121a2565b8060356000828254611b47919061324d565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60008060008411611bec5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016108cf565b611bf4611c97565b841115611c435760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016108cf565b6000611c4f8486612387565b8454909150811415611c68576000809250925050611c90565b6001846001018281548110611c7f57611c7f613346565b906000526020600020015492509250505b9250929050565b60006108816101075490565b600054610100900460ff16611cca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612432565b600054610100900460ff16611cfb5760405162461bcd60e51b81526004016108cf90613202565b61096c81604051806040016040528060018152602001603160f81b815250612480565b600054610100900460ff16611d455760405162461bcd60e51b81526004016108cf90613202565b610ae26124c1565b600054610100900460ff16610ae25760405162461bcd60e51b81526004016108cf90613202565b600054610100900460ff16611d9b5760405162461bcd60e51b81526004016108cf90613202565b610ae26124f5565b600054610100900460ff16611dca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612525565b6001600160a01b03821660009081526033602052604081205411611e245760405162461bcd60e51b81526020600482015260076024820152662173686172657360c81b60448201526064016108cf565b6001600160a01b0380831660009081526101026020526040902080548383166001600160a01b031982161790915516611e7c8183611e77866001600160a01b031660009081526033602052604090205490565b612566565b816001600160a01b0316816001600160a01b0316846001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4505050565b61013680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f2661264a565b610168805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ab63390565b6000611f6d61010780546001019055565b6000611f77611c97565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb6781604051611faa91815260200190565b60405180910390a1919050565b6001600160a01b0382166120175760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108cf565b612023826000836121a2565b6001600160a01b038216600090815260336020526040902054818110156120975760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108cf565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600061084b612104612691565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612156878787876126c8565b915091506121638161278c565b5095945050505050565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b600061084b61210461186c565b6121ad8383836128da565b6001600160a01b03831615806121e05750610136546001600160a01b0316331480156121e057506001600160a01b038216155b806121ef57506101685460ff16155b610f9d5760405162461bcd60e51b81526020600482015260156024820152747368617265733a20217472616e7366657261626c6560581b60448201526064016108cf565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b0381163b6122e95760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016108cf565b60008051602061337383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6123218361292d565b60008251118061232e5750805b15610f9d576116b0838361296d565b6101685460ff16610ae25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108cf565b81546000906123985750600061084b565b82546000905b808210156123e55760006123b28383612a58565b600087815260209020909150859082015411156123d1578091506123df565b6123dc81600161324d565b92505b5061239e565b60008211801561241157508361240e86612400600186613287565b600091825260209091200190565b54145b1561242a57612421600183613287565b9250505061084b565b50905061084b565b600054610100900460ff166124595760405162461bcd60e51b81526004016108cf90613202565b815161246c906036906020850190612d60565b508051610f9d906037906020840190612d60565b600054610100900460ff166124a75760405162461bcd60e51b81526004016108cf90613202565b815160209283012081519190920120606591909155606655565b600054610100900460ff166124e85760405162461bcd60e51b81526004016108cf90613202565b610168805460ff19169055565b600054610100900460ff1661251c5760405162461bcd60e51b81526004016108cf90613202565b610ae233611ecb565b600054610100900460ff1661254c5760405162461bcd60e51b81526004016108cf90613202565b81516020928301208151919092012060cc9190915560cd55565b816001600160a01b0316836001600160a01b03161415801561258757508015155b15610f9d576001600160a01b038316156125e9576001600160a01b0383166000908152610101602052604081205490816125c25760006125d4565b6125cf8560018403610b60565b602001515b90508281036125e586848484612a73565b5050505b6001600160a01b03821615610f9d576001600160a01b03821660009081526101016020526040812054908161261f576000612631565b61262c8460018403610b60565b602001515b905082810161264285848484612a73565b505050505050565b6101685460ff1615610ae25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108cf565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6126c060cc5490565b60cd54612233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126ff5750600090506003612783565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612753573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661277c57600060019250925050612783565b9150600090505b94509492505050565b60008160048111156127a0576127a0613330565b14156127a95750565b60018160048111156127bd576127bd613330565b141561280b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108cf565b600281600481111561281f5761281f613330565b141561286d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108cf565b600381600481111561288157612881613330565b141561096c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108cf565b6128e5838383612b9c565b6001600160a01b038316612904576128fc82612c48565b610f9d612c7c565b6001600160a01b03821661291b576128fc83612c48565b61292483612c48565b610f9d82612c48565b6129368161227c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6129d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016108cf565b600080846001600160a01b0316846040516129f0919061311b565b600060405180830381855af49150503d8060008114612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b5091509150610c04828260405180606001604052806027815260200161339360279139612c8b565b6000612a676002848418613265565b6108709084841661324d565b428315801590612ab357506001600160a01b0385166000908152610100602090815260408083206000198801845290915290205463ffffffff8281169116145b15612aeb576001600160a01b038516600090815261010060209081526040808320600019880184529091529020600101829055612b51565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a16600081815261010084528681208b825284528681209551865463ffffffff191695169490941785559051600194850155825261010190529190912090850190555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6001600160a01b038216600090815260336020526040902054158015612bd957506001600160a01b03821660009081526101016020526040902054155b8015612be55750600081115b15612c15576001600160a01b03821660008181526101026020526040902080546001600160a01b03191690911790555b6001600160a01b0380841660009081526101026020526040808220548584168352912054610f9d92918216911683612566565b6001600160a01b03811660009081526101046020908152604080832060339092529091205461096c9190612ca4565b612ca4565b610ae2610105612c7760355490565b60608315612c9a575081610870565b6108708383612cee565b6000612cae611c97565b905080612cba84612d18565b1015610f9d578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b815115612cfe5781518083602001fd5b8060405162461bcd60e51b81526004016108cf9190613137565b8054600090612d2957506000919050565b81548290612d3990600190613287565b81548110612d4957612d49613346565b90600052602060002001549050919050565b919050565b828054612d6c906132ca565b90600052602060002090601f016020900481019282612d8e5760008555612dd4565b82601f10612da757805160ff1916838001178555612dd4565b82800160010185558215612dd4579182015b82811115612dd4578251825591602001919060010190612db9565b50612de0929150612de4565b5090565b5b80821115612de05760008155600101612de5565b600067ffffffffffffffff80841115612e1457612e1461335c565b604051601f8501601f19908116603f01168101908282118183101715612e3c57612e3c61335c565b81604052809350858152868686011115612e5557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612d5b57600080fd5b600082601f830112612e9757600080fd5b61087083833560208501612df9565b803560ff81168114612d5b57600080fd5b600060208284031215612ec957600080fd5b61087082612e6f565b60008060408385031215612ee557600080fd5b612eee83612e6f565b9150612efc60208401612e6f565b90509250929050565b600080600060608486031215612f1a57600080fd5b612f2384612e6f565b9250612f3160208501612e6f565b9150604084013590509250925092565b600080600080600080600060e0888a031215612f5c57600080fd5b612f6588612e6f565b9650612f7360208901612e6f565b95506040880135945060608801359350612f8f60808901612ea6565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612fbe57600080fd5b612fc783612e6f565b9150602083013567ffffffffffffffff811115612fe357600080fd5b8301601f81018513612ff457600080fd5b61300385823560208401612df9565b9150509250929050565b6000806040838503121561302057600080fd5b61302983612e6f565b946020939093013593505050565b60008060008060008060c0878903121561305057600080fd5b61305987612e6f565b9550602087013594506040870135935061307560608801612ea6565b92506080870135915060a087013590509295509295509295565b6000602082840312156130a157600080fd5b5051919050565b600080604083850312156130bb57600080fd5b823567ffffffffffffffff808211156130d357600080fd5b6130df86838701612e86565b935060208501359150808211156130f557600080fd5b5061300385828601612e86565b60006020828403121561311457600080fd5b5035919050565b6000825161312d81846020870161329e565b9190910192915050565b602081526000825180602084015261315681604085016020870161329e565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156132605761326061331a565b500190565b60008261328257634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156132995761329961331a565b500390565b60005b838110156132b95781810151838201526020016132a1565b838111156116b05750506000910152565b600181811c908216806132de57607f821691505b6020821081141561218f57634e487b7160e01b600052602260045260246000fd5b60006000198214156133135761331361331a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200d1020c104d072d10e2125586128096b7567b61064dc9301fdd4980fc317d26464736f6c63430008070033", + "deployedBytecode": "0x60806040526004361061023b5760003560e01c80635c19a95c1161012e5780639711715a116100ab578063a9059cbb1161006f578063a9059cbb14610705578063c3cda52014610725578063d505accf14610745578063dd62ed3e14610765578063f2fde38b1461078557600080fd5b80639711715a14610670578063981b24d0146106855780639ab24eb0146106a55780639dc29fac146106c5578063a457c2d7146106e557600080fd5b80637ecebe00116100f25780637ecebe00146105f45780638456cb59146106145780638abe09f2146106295780638da5cb5b1461063c57806395d89b411461065b57600080fd5b80635c19a95c146105425780635c975abb146105625780636fcfff451461057b57806370a08231146105a9578063715018a6146105df57600080fd5b80633a46b1a8116101bc5780634f1ef286116101805780634f1ef2861461049657806352d1902d146104a95780635439ad86146104be578063562d190d146104d3578063587cde1e146104f357600080fd5b80633a46b1a8146103e05780633f4ba83a1461040057806340c10f191461041557806347f761f5146104355780634ee2cd7e1461047657600080fd5b806323b872dd1161020357806323b872dd1461034d578063313ce5671461036d5780633644e515146103895780633659cfe61461039e57806339509351146103c057600080fd5b806303c8a3c61461024057806306fdde0314610281578063095ea7b3146102a35780630cdfebfa146102d357806318160ddd14610338575b600080fd5b34801561024c57600080fd5b5061026e61025b366004612eb7565b6101036020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561028d57600080fd5b506102966107a5565b6040516102789190613137565b3480156102af57600080fd5b506102c36102be36600461300d565b610837565b6040519015158152602001610278565b3480156102df57600080fd5b5061031c6102ee36600461300d565b6101006020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff9093168352602083019190915201610278565b34801561034457600080fd5b5060355461026e565b34801561035957600080fd5b506102c3610368366004612f05565b610851565b34801561037957600080fd5b5060405160128152602001610278565b34801561039557600080fd5b5061026e610877565b3480156103aa57600080fd5b506103be6103b9366004612eb7565b610886565b005b3480156103cc57600080fd5b506102c36103db36600461300d565b61096f565b3480156103ec57600080fd5b5061026e6103fb36600461300d565b610991565b34801561040c57600080fd5b506103be610ad2565b34801561042157600080fd5b506103be61043036600461300d565b610ae4565b34801561044157600080fd5b5061045561045036600461300d565b610b60565b60408051825163ffffffff1681526020928301519281019290925201610278565b34801561048257600080fd5b5061026e61049136600461300d565b610bb3565b6103be6104a4366004612fab565b610c0d565b3480156104b557600080fd5b5061026e610cda565b3480156104ca57600080fd5b5061026e610d8d565b3480156104df57600080fd5b506103be6104ee3660046130a8565b610d97565b3480156104ff57600080fd5b5061052a61050e366004612eb7565b610102602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b34801561054e57600080fd5b506103be61055d366004612eb7565b610fa2565b34801561056e57600080fd5b506101685460ff166102c3565b34801561058757600080fd5b5061026e610596366004612eb7565b6101016020526000908152604090205481565b3480156105b557600080fd5b5061026e6105c4366004612eb7565b6001600160a01b031660009081526033602052604090205490565b3480156105eb57600080fd5b506103be610fac565b34801561060057600080fd5b5061026e61060f366004612eb7565b610fbe565b34801561062057600080fd5b506103be610fdc565b34801561063557600080fd5b504261026e565b34801561064857600080fd5b50610136546001600160a01b031661052a565b34801561066757600080fd5b50610296610fec565b34801561067c57600080fd5b5061026e610ffb565b34801561069157600080fd5b5061026e6106a0366004613102565b61100d565b3480156106b157600080fd5b5061026e6106c0366004612eb7565b611039565b3480156106d157600080fd5b506103be6106e036600461300d565b611077565b3480156106f157600080fd5b506102c361070036600461300d565b611089565b34801561071157600080fd5b506102c361072036600461300d565b61110f565b34801561073157600080fd5b506103be610740366004613037565b61111d565b34801561075157600080fd5b506103be610760366004612f41565b611313565b34801561077157600080fd5b5061026e610780366004612ed2565b611477565b34801561079157600080fd5b506103be6107a0366004612eb7565b6114a2565b6060603680546107b4906132ca565b80601f01602080910402602001604051908101604052809291908181526020018280546107e0906132ca565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b5050505050905090565b600033610845818585611518565b60019150505b92915050565b60003361085f85828561163c565b61086a8585856116b6565b60019150505b9392505050565b600061088161186c565b905090565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108d85760405162461bcd60e51b81526004016108cf9061316a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610921600080516020613373833981519152546001600160a01b031690565b6001600160a01b0316146109475760405162461bcd60e51b81526004016108cf906131b6565b610950816118a3565b6040805160008082526020820190925261096c918391906118ab565b50565b6000336108458185856109828383611477565b61098c919061324d565b611518565b60004282106109d05760405162461bcd60e51b815260206004820152600b60248201526a0859195d195c9b5a5b995960aa1b60448201526064016108cf565b6001600160a01b03831660009081526101016020526040902054806109f957600091505061084b565b82610a078560018403610b60565b5163ffffffff1611610a2c57610a208460018303610b60565b6020015191505061084b565b82610a38856000610b60565b5163ffffffff161115610a4f57600091505061084b565b600060001982015b81811115610aba5760028282030481036000610a738883610b60565b805190915063ffffffff16871415610a955760200151945061084b9350505050565b805163ffffffff16871115610aac57819350610ab3565b6001820392505b5050610a57565b610ac48683610b60565b602001519695505050505050565b610ada611a25565b610ae2611a80565b565b610aec611a25565b610af96002600019613265565b81610b0360355490565b610b0d919061324d565b1115610b525760405162461bcd60e51b81526020600482015260146024820152731cda185c995cce8818d85c08195e18d95959195960621b60448201526064016108cf565b610b5c8282611ad3565b5050565b604080518082018252600080825260209182018190526001600160a01b039490941684526101008152818420928452918252918290208251808401909352805463ffffffff168352600101549082015290565b6001600160a01b03821660009081526101046020526040812081908190610bdb908590611ba0565b9150915081610c02576001600160a01b038516600090815260336020526040902054610c04565b805b95945050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610c565760405162461bcd60e51b81526004016108cf9061316a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c9f600080516020613373833981519152546001600160a01b031690565b6001600160a01b031614610cc55760405162461bcd60e51b81526004016108cf906131b6565b610cce826118a3565b610b5c828260016118ab565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d7a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108cf565b5060008051602061337383398151915290565b6000610881611c97565b600054610100900460ff1615808015610db75750600054600160ff909116105b80610dd15750303b158015610dd1575060005460ff166001145b610e345760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108cf565b6000805460ff191660011790558015610e57576000805461ff0019166101001790555b8251610e9a5760405162461bcd60e51b81526020600482015260126024820152717368617265733a206e616d6520656d70747960701b60448201526064016108cf565b8151610edf5760405162461bcd60e51b81526020600482015260146024820152737368617265733a2073796d626f6c20656d70747960601b60448201526064016108cf565b610ee98383611ca3565b610ef283611cd4565b610efa611d1e565b610f02611d4d565b610f0a611d74565b610f12611d4d565b610f576040518060400160405280600a8152602001693232b632b3b0ba34b7b760b11b815250604051806040016040528060018152602001600d60fa1b815250611da3565b8015610f9d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61096c3382611dd4565b610fb4611a25565b610ae26000611ecb565b6001600160a01b03811660009081526099602052604081205461084b565b610fe4611a25565b610ae2611f1e565b6060603780546107b4906132ca565b6000611005611a25565b610881611f5c565b600080600061101e84610105611ba0565b915091508161102f57603554611031565b805b949350505050565b6001600160a01b038116600090815261010160205260408120548061105f576000610870565b61106c8360018303610b60565b602001519392505050565b61107f611a25565b610b5c8282611fb7565b600033816110978286611477565b9050838110156110f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108cf565b6111048286868403611518565b506001949350505050565b6000336108458185856116b6565b8342111561116d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016108cf565b600061121661120e7f0e3bc21ca2be03aeeee0e614bfe98f970c96a05a768f627c50ab81764cb5026861119e6107a5565b6040516020016111ae919061311b565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905260c001604051602081830303815290604052805190602001206120f7565b858585612145565b90506001600160a01b03811661126e5760405162461bcd60e51b815260206004820181905260248201527f4552433230566f7465733a20696e76616c6964207369676e657220283078302960448201526064016108cf565b6001600160a01b0381166000908152610103602052604090205486146112d65760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016108cf565b6001600160a01b0381166000908152610103602052604081208054916112fb836132ff565b919050555061130a8188611dd4565b50505050505050565b834211156113635760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016108cf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113928c61216d565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006113ed82612195565b905060006113fd82878787612145565b9050896001600160a01b0316816001600160a01b0316146114605760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016108cf565b61146b8a8a8a611518565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6114aa611a25565b6001600160a01b03811661150f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108cf565b61096c81611ecb565b6001600160a01b03831661157a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108cf565b6001600160a01b0382166115db5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108cf565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006116488484611477565b905060001981146116b057818110156116a35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108cf565b6116b08484848403611518565b50505050565b6001600160a01b03831661171a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108cf565b6001600160a01b03821661177c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108cf565b6117878383836121a2565b6001600160a01b038316600090815260336020526040902054818110156117ff5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108cf565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061185f9086815260200190565b60405180910390a36116b0565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61189b60655490565b606654612233565b61096c611a25565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156118de57610f9d8361227c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191757600080fd5b505afa925050508015611947575060408051601f3d908101601f191682019092526119449181019061308f565b60015b6119aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016108cf565b6000805160206133738339815191528114611a195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016108cf565b50610f9d838383612318565b610136546001600160a01b03163314610ae25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108cf565b611a8861233d565b610168805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b295760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108cf565b611b35600083836121a2565b8060356000828254611b47919061324d565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60008060008411611bec5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016108cf565b611bf4611c97565b841115611c435760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016108cf565b6000611c4f8486612387565b8454909150811415611c68576000809250925050611c90565b6001846001018281548110611c7f57611c7f613346565b906000526020600020015492509250505b9250929050565b60006108816101075490565b600054610100900460ff16611cca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612432565b600054610100900460ff16611cfb5760405162461bcd60e51b81526004016108cf90613202565b61096c81604051806040016040528060018152602001603160f81b815250612480565b600054610100900460ff16611d455760405162461bcd60e51b81526004016108cf90613202565b610ae26124c1565b600054610100900460ff16610ae25760405162461bcd60e51b81526004016108cf90613202565b600054610100900460ff16611d9b5760405162461bcd60e51b81526004016108cf90613202565b610ae26124f5565b600054610100900460ff16611dca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612525565b6001600160a01b03821660009081526033602052604081205411611e245760405162461bcd60e51b81526020600482015260076024820152662173686172657360c81b60448201526064016108cf565b6001600160a01b0380831660009081526101026020526040902080548383166001600160a01b031982161790915516611e7c8183611e77866001600160a01b031660009081526033602052604090205490565b612566565b816001600160a01b0316816001600160a01b0316846001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4505050565b61013680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f2661264a565b610168805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ab63390565b6000611f6d61010780546001019055565b6000611f77611c97565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb6781604051611faa91815260200190565b60405180910390a1919050565b6001600160a01b0382166120175760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108cf565b612023826000836121a2565b6001600160a01b038216600090815260336020526040902054818110156120975760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108cf565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600061084b612104612691565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612156878787876126c8565b915091506121638161278c565b5095945050505050565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b600061084b61210461186c565b6121ad8383836128da565b6001600160a01b03831615806121e05750610136546001600160a01b0316331480156121e057506001600160a01b038216155b806121ef57506101685460ff16155b610f9d5760405162461bcd60e51b81526020600482015260156024820152747368617265733a20217472616e7366657261626c6560581b60448201526064016108cf565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b0381163b6122e95760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016108cf565b60008051602061337383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6123218361292d565b60008251118061232e5750805b15610f9d576116b0838361296d565b6101685460ff16610ae25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108cf565b81546000906123985750600061084b565b82546000905b808210156123e55760006123b28383612a58565b600087815260209020909150859082015411156123d1578091506123df565b6123dc81600161324d565b92505b5061239e565b60008211801561241157508361240e86612400600186613287565b600091825260209091200190565b54145b1561242a57612421600183613287565b9250505061084b565b50905061084b565b600054610100900460ff166124595760405162461bcd60e51b81526004016108cf90613202565b815161246c906036906020850190612d60565b508051610f9d906037906020840190612d60565b600054610100900460ff166124a75760405162461bcd60e51b81526004016108cf90613202565b815160209283012081519190920120606591909155606655565b600054610100900460ff166124e85760405162461bcd60e51b81526004016108cf90613202565b610168805460ff19169055565b600054610100900460ff1661251c5760405162461bcd60e51b81526004016108cf90613202565b610ae233611ecb565b600054610100900460ff1661254c5760405162461bcd60e51b81526004016108cf90613202565b81516020928301208151919092012060cc9190915560cd55565b816001600160a01b0316836001600160a01b03161415801561258757508015155b15610f9d576001600160a01b038316156125e9576001600160a01b0383166000908152610101602052604081205490816125c25760006125d4565b6125cf8560018403610b60565b602001515b90508281036125e586848484612a73565b5050505b6001600160a01b03821615610f9d576001600160a01b03821660009081526101016020526040812054908161261f576000612631565b61262c8460018403610b60565b602001515b905082810161264285848484612a73565b505050505050565b6101685460ff1615610ae25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108cf565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6126c060cc5490565b60cd54612233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126ff5750600090506003612783565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612753573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661277c57600060019250925050612783565b9150600090505b94509492505050565b60008160048111156127a0576127a0613330565b14156127a95750565b60018160048111156127bd576127bd613330565b141561280b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108cf565b600281600481111561281f5761281f613330565b141561286d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108cf565b600381600481111561288157612881613330565b141561096c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108cf565b6128e5838383612b9c565b6001600160a01b038316612904576128fc82612c48565b610f9d612c7c565b6001600160a01b03821661291b576128fc83612c48565b61292483612c48565b610f9d82612c48565b6129368161227c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6129d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016108cf565b600080846001600160a01b0316846040516129f0919061311b565b600060405180830381855af49150503d8060008114612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b5091509150610c04828260405180606001604052806027815260200161339360279139612c8b565b6000612a676002848418613265565b6108709084841661324d565b428315801590612ab357506001600160a01b0385166000908152610100602090815260408083206000198801845290915290205463ffffffff8281169116145b15612aeb576001600160a01b038516600090815261010060209081526040808320600019880184529091529020600101829055612b51565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a16600081815261010084528681208b825284528681209551865463ffffffff191695169490941785559051600194850155825261010190529190912090850190555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6001600160a01b038216600090815260336020526040902054158015612bd957506001600160a01b03821660009081526101016020526040902054155b8015612be55750600081115b15612c15576001600160a01b03821660008181526101026020526040902080546001600160a01b03191690911790555b6001600160a01b0380841660009081526101026020526040808220548584168352912054610f9d92918216911683612566565b6001600160a01b03811660009081526101046020908152604080832060339092529091205461096c9190612ca4565b612ca4565b610ae2610105612c7760355490565b60608315612c9a575081610870565b6108708383612cee565b6000612cae611c97565b905080612cba84612d18565b1015610f9d578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b815115612cfe5781518083602001fd5b8060405162461bcd60e51b81526004016108cf9190613137565b8054600090612d2957506000919050565b81548290612d3990600190613287565b81548110612d4957612d49613346565b90600052602060002001549050919050565b919050565b828054612d6c906132ca565b90600052602060002090601f016020900481019282612d8e5760008555612dd4565b82601f10612da757805160ff1916838001178555612dd4565b82800160010185558215612dd4579182015b82811115612dd4578251825591602001919060010190612db9565b50612de0929150612de4565b5090565b5b80821115612de05760008155600101612de5565b600067ffffffffffffffff80841115612e1457612e1461335c565b604051601f8501601f19908116603f01168101908282118183101715612e3c57612e3c61335c565b81604052809350858152868686011115612e5557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612d5b57600080fd5b600082601f830112612e9757600080fd5b61087083833560208501612df9565b803560ff81168114612d5b57600080fd5b600060208284031215612ec957600080fd5b61087082612e6f565b60008060408385031215612ee557600080fd5b612eee83612e6f565b9150612efc60208401612e6f565b90509250929050565b600080600060608486031215612f1a57600080fd5b612f2384612e6f565b9250612f3160208501612e6f565b9150604084013590509250925092565b600080600080600080600060e0888a031215612f5c57600080fd5b612f6588612e6f565b9650612f7360208901612e6f565b95506040880135945060608801359350612f8f60808901612ea6565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612fbe57600080fd5b612fc783612e6f565b9150602083013567ffffffffffffffff811115612fe357600080fd5b8301601f81018513612ff457600080fd5b61300385823560208401612df9565b9150509250929050565b6000806040838503121561302057600080fd5b61302983612e6f565b946020939093013593505050565b60008060008060008060c0878903121561305057600080fd5b61305987612e6f565b9550602087013594506040870135935061307560608801612ea6565b92506080870135915060a087013590509295509295509295565b6000602082840312156130a157600080fd5b5051919050565b600080604083850312156130bb57600080fd5b823567ffffffffffffffff808211156130d357600080fd5b6130df86838701612e86565b935060208501359150808211156130f557600080fd5b5061300385828601612e86565b60006020828403121561311457600080fd5b5035919050565b6000825161312d81846020870161329e565b9190910192915050565b602081526000825180602084015261315681604085016020870161329e565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156132605761326061331a565b500190565b60008261328257634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156132995761329961331a565b500390565b60005b838110156132b95781810151838201526020016132a1565b838111156116b05750506000910152565b600181811c908216806132de57607f821691505b6020821081141561218f57634e487b7160e01b600052602260045260246000fd5b60006000198214156133135761331361331a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200d1020c104d072d10e2125586128096b7567b61064dc9301fdd4980fc317d26464736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "balanceOfAt(address,uint256)": { + "details": "Retrieves the balance of `account` at the time `snapshotId` was created." + }, + "burn(address,uint256)": { + "params": { + "account": "Address to lose shares", + "amount": "Amount to burn" + } + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "delegate(address)": { + "params": { + "delegatee": "The address to delegate votes to." + } + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "params": { + "delegatee": "The address to delegate 'votes' to.", + "expiry": "The time at which to expire the signature.", + "nonce": "The contract state required to match the signature.", + "r": "The r signature", + "s": "The s signature", + "v": "The v signature" + } + }, + "getPastVotes(address,uint256)": { + "params": { + "account": "The user to check `votes` for.", + "timePoint": "The unix time to check `votes` for." + }, + "returns": { + "votes": "Past `votes` delegated to `account`." + } + }, + "getVotes(address)": { + "params": { + "account": "The user to check delegated `votes` for." + }, + "returns": { + "votes": "Current `votes` delegated to `account`." + } + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "params": { + "amount": "Amount to mint", + "recipient": "Address to receive shares" + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "now()": { + "returns": { + "timePoint": "returns unix epoch timestamp" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(string,string)": { + "details": "initializer should prevent this from being called again", + "params": { + "name_": "Name for ERC20 token trackers", + "symbol_": "Symbol for ERC20 token trackers" + } + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "totalSupplyAt(uint256)": { + "details": "Retrieves the total supply at the time `snapshotId` was created." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Shares", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burn(address,uint256)": { + "notice": "Baal-only function to burn shares." + }, + "delegate(address)": { + "notice": "Delegate votes from user to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "notice": "Delegates votes from `signer` to `delegatee` with EIP-712 signature." + }, + "getCurrentSnapshotId()": { + "notice": "get current SnapshotId" + }, + "getPastVotes(address,uint256)": { + "notice": "Returns the prior number of `votes` for `account` as of `timePoint`." + }, + "getVotes(address)": { + "notice": "Returns the current delegated `vote` balance for `account`." + }, + "mint(address,uint256)": { + "notice": "Baal-only function to mint shares." + }, + "now()": { + "notice": "Returns the current timepoint." + }, + "pause()": { + "notice": "Baal-only function to pause shares." + }, + "setUp(string,string)": { + "notice": "Configure shares - called by Baal on summon" + }, + "snapshot()": { + "notice": "Allows baal to create a snapshot" + }, + "unpause()": { + "notice": "Baal-only function to unpause shares." + } + }, + "notice": "Accounting for Baal non voting shares", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4971, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 4977, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 4979, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 4981, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 4983, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 5563, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 7403, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "101", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "102", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6041, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_nonces", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_address,t_struct(Counter)6730_storage)" + }, + { + "astId": 6049, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "154", + "type": "t_bytes32" + }, + { + "astId": 6205, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 16164, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_NAME_DELEGATION", + "offset": 0, + "slot": "204", + "type": "t_bytes32" + }, + { + "astId": 16166, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_VERSION_DELEGATION", + "offset": 0, + "slot": "205", + "type": "t_bytes32" + }, + { + "astId": 16304, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "206", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 15565, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "checkpoints", + "offset": 0, + "slot": "256", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)15558_storage))" + }, + { + "astId": 15569, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "numCheckpoints", + "offset": 0, + "slot": "257", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 15573, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "delegates", + "offset": 0, + "slot": "258", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 15577, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "delegationNonces", + "offset": 0, + "slot": "259", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5685, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "260", + "type": "t_mapping(t_address,t_struct(Snapshots)5680_storage)" + }, + { + "astId": 5688, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "261", + "type": "t_struct(Snapshots)5680_storage" + }, + { + "astId": 5691, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_currentSnapshotId", + "offset": 0, + "slot": "263", + "type": "t_struct(Counter)6730_storage" + }, + { + "astId": 5989, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "264", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 3937, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_owner", + "offset": 0, + "slot": "310", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "311", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4773, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_paused", + "offset": 0, + "slot": "360", + "type": "t_bool" + }, + { + "astId": 4878, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "361", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "410", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "460", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)15558_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct BaalVotes.Checkpoint))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Checkpoint)15558_storage)" + }, + "t_mapping(t_address,t_struct(Counter)6730_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)6730_storage" + }, + "t_mapping(t_address,t_struct(Snapshots)5680_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20SnapshotUpgradeable.Snapshots)", + "numberOfBytes": "32", + "value": "t_struct(Snapshots)5680_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_struct(Checkpoint)15558_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct BaalVotes.Checkpoint)", + "numberOfBytes": "32", + "value": "t_struct(Checkpoint)15558_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)15558_storage": { + "encoding": "inplace", + "label": "struct BaalVotes.Checkpoint", + "members": [ + { + "astId": 15555, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "fromTimePoint", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 15557, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "votes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)6730_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 6729, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Snapshots)5680_storage": { + "encoding": "inplace", + "label": "struct ERC20SnapshotUpgradeable.Snapshots", + "members": [ + { + "astId": 5676, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "ids", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 5679, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "values", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/TributeMinion.json b/deployments/base/TributeMinion.json new file mode 100644 index 0000000..799ef2c --- /dev/null +++ b/deployments/base/TributeMinion.json @@ -0,0 +1,355 @@ +{ + "address": "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "applicant", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EscrowReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "TributeProposal", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loot", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + } + ], + "name": "encodeTributeProposal", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "escrows", + "outputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "applicant", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "released", + "type": "bool" + }, + { + "internalType": "address", + "name": "safe", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_baal", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "releaseEscrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Baal", + "name": "baal", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loot", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalgas", + "type": "uint256" + }, + { + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "submitTributeProposal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x30db36d2acee89378eee8a9417ad3cb27e364b36389c7079152b6f961c5dc1c2", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + "transactionIndex": 3, + "gasUsed": "885797", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xef625e1653fce2b83964112a2f63867c4a55a4f22eeca0956c986a71b65bfdb5", + "transactionHash": "0x30db36d2acee89378eee8a9417ad3cb27e364b36389c7079152b6f961c5dc1c2", + "logs": [], + "blockNumber": 7428418, + "cumulativeGasUsed": "1423490", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"applicant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EscrowReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"TributeProposal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loot\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"escrow\",\"type\":\"address\"}],\"name\":\"encodeTributeProposal\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"escrows\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"applicant\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"released\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_baal\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"releaseEscrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Baal\",\"name\":\"baal\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loot\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalgas\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"submitTributeProposal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tools/TributeMinion.sol\":\"TributeMinion\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"},\"contracts/tools/TributeMinion.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\nimport \\\"../Baal.sol\\\";\\n\\ninterface IERC20 {\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) external returns (bool);\\n}\\n\\ncontract TributeMinion {\\n event TributeProposal(\\n address indexed baal,\\n address token,\\n uint256 amount,\\n address recipient,\\n uint256 proposalId\\n );\\n struct Escrow {\\n address token;\\n address applicant;\\n uint256 amount;\\n bool released;\\n address safe;\\n }\\n mapping(address => mapping(uint256 => Escrow)) public escrows;\\n\\n event EscrowReleased(\\n address indexed baal,\\n uint32 proposalId,\\n address applicant,\\n address safe,\\n uint256 amount\\n );\\n\\n function encodeTributeProposal(\\n address baal,\\n uint256 shares,\\n uint256 loot,\\n address recipient,\\n uint32 proposalId,\\n address escrow\\n ) public pure returns (bytes memory) {\\n // Workaround for solidity dynamic memory array\\n address[] memory _recipients = new address[](1);\\n _recipients[0] = recipient;\\n\\n bytes memory _releaseEscrow = abi.encodeWithSignature(\\n \\\"releaseEscrow(address,uint32)\\\",\\n baal,\\n proposalId\\n );\\n\\n bytes memory tributeMultisend = abi.encodePacked(\\n uint8(0),\\n escrow,\\n uint256(0),\\n uint256(_releaseEscrow.length),\\n bytes(_releaseEscrow)\\n );\\n\\n if (shares > 0) {\\n // Workaround for solidity dynamic memory array\\n uint256[] memory _shares = new uint256[](1);\\n _shares[0] = shares;\\n\\n bytes memory _issueShares = abi.encodeWithSignature(\\n \\\"mintShares(address[],uint256[])\\\",\\n _recipients,\\n _shares\\n );\\n\\n tributeMultisend = abi.encodePacked(\\n tributeMultisend,\\n uint8(0),\\n baal,\\n uint256(0),\\n uint256(_issueShares.length),\\n bytes(_issueShares)\\n );\\n }\\n if (loot > 0) {\\n // Workaround for solidity dynamic memory array\\n uint256[] memory _loot = new uint256[](1);\\n _loot[0] = loot;\\n\\n bytes memory _issueLoot = abi.encodeWithSignature(\\n \\\"mintLoot(address[],uint256[])\\\",\\n _recipients,\\n _loot\\n );\\n\\n tributeMultisend = abi.encodePacked(\\n tributeMultisend,\\n uint8(0),\\n address(baal),\\n uint256(0),\\n uint256(_issueLoot.length),\\n bytes(_issueLoot)\\n );\\n }\\n\\n bytes memory _multisendAction = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n tributeMultisend\\n );\\n return _multisendAction;\\n }\\n\\n function submitTributeProposal(\\n Baal baal,\\n address token,\\n uint256 amount,\\n uint256 shares,\\n uint256 loot,\\n uint32 expiration,\\n uint256 baalgas,\\n string memory details\\n ) external payable {\\n uint32 proposalId = baal.proposalCount() + 1;\\n\\n bytes memory encodedProposal = encodeTributeProposal(\\n address(baal),\\n shares,\\n loot,\\n msg.sender,\\n proposalId,\\n address(this)\\n );\\n\\n escrows[address(baal)][proposalId] = Escrow(\\n token,\\n msg.sender,\\n amount,\\n false,\\n baal.target()\\n );\\n\\n baal.submitProposal{value:msg.value}(encodedProposal, expiration, baalgas, details);\\n\\n emit TributeProposal(\\n address(baal),\\n token,\\n amount,\\n msg.sender,\\n proposalId\\n );\\n }\\n\\n function releaseEscrow(address _baal, uint32 _proposalId) external {\\n Baal baal = Baal(_baal);\\n Escrow storage escrow = escrows[address(baal)][_proposalId];\\n require(!escrow.released, \\\"Already released\\\");\\n\\n bool[4] memory status = baal.getProposalStatus(_proposalId);\\n require(status[2], \\\"Not passed\\\");\\n escrow.released = true;\\n\\n IERC20 token = IERC20(escrow.token);\\n\\n emit EscrowReleased(\\n _baal,\\n _proposalId,\\n escrow.applicant,\\n escrow.safe,\\n escrow.amount\\n );\\n\\n require(\\n token.transferFrom(escrow.applicant, escrow.safe, escrow.amount),\\n \\\"Transfer failed\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x878896b7c3bdd2b2132d356d9d6f6cff263c88027970ea8c2c917d6fdef52209\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610f10806100206000396000f3fe60806040526004361061003f5760003560e01c806304a54aa7146100445780633336c279146100e0578063610ac73d146101025780636bd4afe714610115575b600080fd5b34801561005057600080fd5b506100a561005f366004610980565b600060208181529281526040808220909352908152208054600182015460028301546003909301546001600160a01b03928316939183169260ff82169161010090041685565b604080516001600160a01b039687168152948616602086015284019290925215156060830152909116608082015260a0015b60405180910390f35b3480156100ec57600080fd5b506101006100fb366004610a1c565b610142565b005b610100610110366004610afe565b6103de565b34801561012157600080fd5b506101356101303660046109ac565b61069d565b6040516100d79190610d98565b6001600160a01b03821660009081526020818152604080832063ffffffff851684529091529020600381015483919060ff16156101b95760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995b19585cd95960821b60448201526064015b60405180910390fd5b60405163118c2bff60e21b815263ffffffff841660048201526000906001600160a01b03841690634630affc9060240160806040518083038186803b15801561020157600080fd5b505afa158015610215573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102399190610a55565b604081015190915061027a5760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185cdcd95960b21b60448201526064016101b0565b60038201805460ff191660019081179182905583549084015460028501546040805163ffffffff8a1681526001600160a01b039384166020820152610100909504831690850152606084015290811691908716907f637fb12bbeb9000df3de89d3f54dba04a8940ff0b762f16937aa1bc12dfc26779060800160405180910390a26001830154600384015460028501546040516323b872dd60e01b81526001600160a01b039384166004820152610100909204831660248301526044820152908216906323b872dd90606401602060405180830381600087803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190610ae3565b6103d65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050505050565b6000886001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561041957600080fd5b505afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610c0b565b61045c906001610e1e565b9050600061046e8a888833863061069d565b90506040518060a001604052808a6001600160a01b03168152602001336001600160a01b031681526020018981526020016000151581526020018b6001600160a01b031663d4b839926040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610519919061095c565b6001600160a01b039081169091528b811660008181526020818152604080832063ffffffff89168452825291829020855181549086166001600160a01b031991821617825591860151600182018054918716919093161790915584820151600282015560608501516003909101805460809096015190941661010002610100600160a81b0319911515919091166001600160a81b0319909516949094179390931790915590516307505ff960e31b8152633a82ffc89034906105e59085908a908a908a90600401610dab565b6020604051808303818588803b1580156105fe57600080fd5b505af1158015610612573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106379190610bf2565b50604080516001600160a01b038b81168252602082018b9052338284015263ffffffff851660608301529151918c16917f1deb8b1e22941ec32a7ed14b2d25bdb44593ab343156feb1c735ec06696221399181900360800190a250505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905084816000815181106106d7576106d7610e84565b6001600160a01b039283166020918202929092010152604051908916602482015263ffffffff8516604482015260009060640160408051601f19818403018152918152602080830180516001600160e01b0316633336c27960e01b179052825191519293506000926107529284928992849291889101610cbe565b60408051601f198184030181529190529050881561082f576040805160018082528183019092526000916020808301908036833701905050905089816000815181106107a0576107a0610e84565b602002602001018181525050600084826040516024016107c1929190610d14565b604051602081830303815290604052632c78fd0360e21b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d600084518560405160200161081b96959493929190610c54565b604051602081830303815290604052925050505b87156108fa5760408051600180825281830190925260009160208083019080368337019050509050888160008151811061086b5761086b610e84565b6020026020010181815250506000848260405160240161088c929190610d14565b6040516020818303038152906040526322936c2360e11b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d60008451856040516020016108e696959493929190610c54565b604051602081830303815290604052925050505b60008160405160240161090d9190610d98565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b1790529450505050509695505050505050565b8051801515811461095757600080fd5b919050565b60006020828403121561096e57600080fd5b815161097981610eb0565b9392505050565b6000806040838503121561099357600080fd5b823561099e81610eb0565b946020939093013593505050565b60008060008060008060c087890312156109c557600080fd5b86356109d081610eb0565b9550602087013594506040870135935060608701356109ee81610eb0565b925060808701356109fe81610ec8565b915060a0870135610a0e81610eb0565b809150509295509295509295565b60008060408385031215610a2f57600080fd5b8235610a3a81610eb0565b91506020830135610a4a81610ec8565b809150509250929050565b600060808284031215610a6757600080fd5b82601f830112610a7657600080fd5b6040516080810181811067ffffffffffffffff82111715610a9957610a99610e9a565b604052808360808101861015610aae57600080fd5b60005b6004811015610ad857610ac382610947565b83526020928301929190910190600101610ab1565b509195945050505050565b600060208284031215610af557600080fd5b61097982610947565b600080600080600080600080610100898b031215610b1b57600080fd5b8835610b2681610eb0565b9750602089810135610b3781610eb0565b975060408a0135965060608a0135955060808a0135945060a08a0135610b5c81610ec8565b935060c08a0135925060e08a013567ffffffffffffffff80821115610b8057600080fd5b818c0191508c601f830112610b9457600080fd5b813581811115610ba657610ba6610e9a565b610bb8601f8201601f19168501610ded565b91508082528d84828501011115610bce57600080fd5b80848401858401376000848284010152508093505050509295985092959890939650565b600060208284031215610c0457600080fd5b5051919050565b600060208284031215610c1d57600080fd5b815161097981610ec8565b60008151808452610c40816020860160208601610e54565b601f01601f19169290920160200192915050565b60008751610c66818460208c01610e54565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351610cae816055840160208801610e54565b0160550198975050505050505050565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251610d03816055850160208701610e54565b919091016055019695505050505050565b604080825283519082018190526000906020906060840190828701845b82811015610d565781516001600160a01b031684529284019290840190600101610d31565b5050508381038285015284518082528583019183019060005b81811015610d8b57835183529284019291840191600101610d6f565b5090979650505050505050565b6020815260006109796020830184610c28565b608081526000610dbe6080830187610c28565b63ffffffff861660208401528460408401528281036060840152610de28185610c28565b979650505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e1657610e16610e9a565b604052919050565b600063ffffffff808316818516808303821115610e4b57634e487b7160e01b600052601160045260246000fd5b01949350505050565b60005b83811015610e6f578181015183820152602001610e57565b83811115610e7e576000848401525b50505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec557600080fd5b50565b63ffffffff81168114610ec557600080fdfea2646970667358221220a3323eb1a602115aba0d9a9bf27a1b961890e40a7d0dbd148bb6b967aef950c264736f6c63430008070033", + "deployedBytecode": "0x60806040526004361061003f5760003560e01c806304a54aa7146100445780633336c279146100e0578063610ac73d146101025780636bd4afe714610115575b600080fd5b34801561005057600080fd5b506100a561005f366004610980565b600060208181529281526040808220909352908152208054600182015460028301546003909301546001600160a01b03928316939183169260ff82169161010090041685565b604080516001600160a01b039687168152948616602086015284019290925215156060830152909116608082015260a0015b60405180910390f35b3480156100ec57600080fd5b506101006100fb366004610a1c565b610142565b005b610100610110366004610afe565b6103de565b34801561012157600080fd5b506101356101303660046109ac565b61069d565b6040516100d79190610d98565b6001600160a01b03821660009081526020818152604080832063ffffffff851684529091529020600381015483919060ff16156101b95760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995b19585cd95960821b60448201526064015b60405180910390fd5b60405163118c2bff60e21b815263ffffffff841660048201526000906001600160a01b03841690634630affc9060240160806040518083038186803b15801561020157600080fd5b505afa158015610215573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102399190610a55565b604081015190915061027a5760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185cdcd95960b21b60448201526064016101b0565b60038201805460ff191660019081179182905583549084015460028501546040805163ffffffff8a1681526001600160a01b039384166020820152610100909504831690850152606084015290811691908716907f637fb12bbeb9000df3de89d3f54dba04a8940ff0b762f16937aa1bc12dfc26779060800160405180910390a26001830154600384015460028501546040516323b872dd60e01b81526001600160a01b039384166004820152610100909204831660248301526044820152908216906323b872dd90606401602060405180830381600087803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190610ae3565b6103d65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050505050565b6000886001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561041957600080fd5b505afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610c0b565b61045c906001610e1e565b9050600061046e8a888833863061069d565b90506040518060a001604052808a6001600160a01b03168152602001336001600160a01b031681526020018981526020016000151581526020018b6001600160a01b031663d4b839926040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610519919061095c565b6001600160a01b039081169091528b811660008181526020818152604080832063ffffffff89168452825291829020855181549086166001600160a01b031991821617825591860151600182018054918716919093161790915584820151600282015560608501516003909101805460809096015190941661010002610100600160a81b0319911515919091166001600160a81b0319909516949094179390931790915590516307505ff960e31b8152633a82ffc89034906105e59085908a908a908a90600401610dab565b6020604051808303818588803b1580156105fe57600080fd5b505af1158015610612573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106379190610bf2565b50604080516001600160a01b038b81168252602082018b9052338284015263ffffffff851660608301529151918c16917f1deb8b1e22941ec32a7ed14b2d25bdb44593ab343156feb1c735ec06696221399181900360800190a250505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905084816000815181106106d7576106d7610e84565b6001600160a01b039283166020918202929092010152604051908916602482015263ffffffff8516604482015260009060640160408051601f19818403018152918152602080830180516001600160e01b0316633336c27960e01b179052825191519293506000926107529284928992849291889101610cbe565b60408051601f198184030181529190529050881561082f576040805160018082528183019092526000916020808301908036833701905050905089816000815181106107a0576107a0610e84565b602002602001018181525050600084826040516024016107c1929190610d14565b604051602081830303815290604052632c78fd0360e21b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d600084518560405160200161081b96959493929190610c54565b604051602081830303815290604052925050505b87156108fa5760408051600180825281830190925260009160208083019080368337019050509050888160008151811061086b5761086b610e84565b6020026020010181815250506000848260405160240161088c929190610d14565b6040516020818303038152906040526322936c2360e11b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d60008451856040516020016108e696959493929190610c54565b604051602081830303815290604052925050505b60008160405160240161090d9190610d98565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b1790529450505050509695505050505050565b8051801515811461095757600080fd5b919050565b60006020828403121561096e57600080fd5b815161097981610eb0565b9392505050565b6000806040838503121561099357600080fd5b823561099e81610eb0565b946020939093013593505050565b60008060008060008060c087890312156109c557600080fd5b86356109d081610eb0565b9550602087013594506040870135935060608701356109ee81610eb0565b925060808701356109fe81610ec8565b915060a0870135610a0e81610eb0565b809150509295509295509295565b60008060408385031215610a2f57600080fd5b8235610a3a81610eb0565b91506020830135610a4a81610ec8565b809150509250929050565b600060808284031215610a6757600080fd5b82601f830112610a7657600080fd5b6040516080810181811067ffffffffffffffff82111715610a9957610a99610e9a565b604052808360808101861015610aae57600080fd5b60005b6004811015610ad857610ac382610947565b83526020928301929190910190600101610ab1565b509195945050505050565b600060208284031215610af557600080fd5b61097982610947565b600080600080600080600080610100898b031215610b1b57600080fd5b8835610b2681610eb0565b9750602089810135610b3781610eb0565b975060408a0135965060608a0135955060808a0135945060a08a0135610b5c81610ec8565b935060c08a0135925060e08a013567ffffffffffffffff80821115610b8057600080fd5b818c0191508c601f830112610b9457600080fd5b813581811115610ba657610ba6610e9a565b610bb8601f8201601f19168501610ded565b91508082528d84828501011115610bce57600080fd5b80848401858401376000848284010152508093505050509295985092959890939650565b600060208284031215610c0457600080fd5b5051919050565b600060208284031215610c1d57600080fd5b815161097981610ec8565b60008151808452610c40816020860160208601610e54565b601f01601f19169290920160200192915050565b60008751610c66818460208c01610e54565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351610cae816055840160208801610e54565b0160550198975050505050505050565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251610d03816055850160208701610e54565b919091016055019695505050505050565b604080825283519082018190526000906020906060840190828701845b82811015610d565781516001600160a01b031684529284019290840190600101610d31565b5050508381038285015284518082528583019183019060005b81811015610d8b57835183529284019291840191600101610d6f565b5090979650505050505050565b6020815260006109796020830184610c28565b608081526000610dbe6080830187610c28565b63ffffffff861660208401528460408401528281036060840152610de28185610c28565b979650505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e1657610e16610e9a565b604052919050565b600063ffffffff808316818516808303821115610e4b57634e487b7160e01b600052601160045260246000fd5b01949350505050565b60005b83811015610e6f578181015183820152602001610e57565b83811115610e7e576000848401525b50505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec557600080fd5b50565b63ffffffff81168114610ec557600080fdfea2646970667358221220a3323eb1a602115aba0d9a9bf27a1b961890e40a7d0dbd148bb6b967aef950c264736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 15153, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "escrows", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Escrow)15146_storage))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Escrow)15146_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct TributeMinion.Escrow))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Escrow)15146_storage)" + }, + "t_mapping(t_uint256,t_struct(Escrow)15146_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct TributeMinion.Escrow)", + "numberOfBytes": "32", + "value": "t_struct(Escrow)15146_storage" + }, + "t_struct(Escrow)15146_storage": { + "encoding": "inplace", + "label": "struct TributeMinion.Escrow", + "members": [ + { + "astId": 15137, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "token", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 15139, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "applicant", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 15141, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "amount", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 15143, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "released", + "offset": 0, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 15145, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "safe", + "offset": 1, + "slot": "3", + "type": "t_address" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/base/solcInputs/0e89febeebc7444140de8e67c9067d2c.json b/deployments/base/solcInputs/0e89febeebc7444140de8e67c9067d2c.json new file mode 100644 index 0000000..6eb5ed9 --- /dev/null +++ b/deployments/base/solcInputs/0e89febeebc7444140de8e67c9067d2c.json @@ -0,0 +1,80 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/openzeppelin/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor (address initialOwner) {\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/openzeppelin/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n\n constructor (address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n TransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view virtual returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(Address.isContract(IBeacon(newBeacon).implementation()), \"ERC1967: beacon implementation is not a contract\");\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "solc_0.8/openzeppelin/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "solc_0.8/openzeppelin/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\n address internal immutable _ADMIN;\n\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _ADMIN = admin_;\n\n // still store it to work with EIP-1967\n bytes32 slot = _ADMIN_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, admin_)\n }\n emit AdminChanged(address(0), admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n\n function _getAdmin() internal view virtual override returns (address) {\n return _ADMIN;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate that the this implementation remains valid after an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n}\n" + }, + "solc_0.8/openzeppelin/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n\n constructor(address implementation_, address initialOwner) Ownable(initialOwner) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from a {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n assert(_BEACON_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.beacon\")) - 1));\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\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 + } + } +} \ No newline at end of file diff --git a/deployments/base/solcInputs/928daf6847beb441da40e990eb20d125.json b/deployments/base/solcInputs/928daf6847beb441da40e990eb20d125.json new file mode 100644 index 0000000..fb39b99 --- /dev/null +++ b/deployments/base/solcInputs/928daf6847beb441da40e990eb20d125.json @@ -0,0 +1,284 @@ +{ + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/base/Executor.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - \ncontract Executor {\n function execute(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 txGas\n ) internal returns (bool success) {\n if (operation == Enum.Operation.DelegateCall) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n } else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract FallbackManager is SelfAuthorized {\n event ChangedFallbackHandler(address handler);\n\n // keccak256(\"fallback_manager.handler.address\")\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\n\n function internalSetFallbackHandler(address handler) internal {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, handler)\n }\n }\n\n /// @dev Allows to add a contract to handle fallback calls.\n /// Only fallback calls without value and with data will be forwarded.\n /// This can only be done via a Safe transaction.\n /// @param handler contract to handle fallbacks calls.\n function setFallbackHandler(address handler) public authorized {\n internalSetFallbackHandler(handler);\n emit ChangedFallbackHandler(handler);\n }\n\n // solhint-disable-next-line payable-fallback,no-complex-fallback\n fallback() external {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let handler := sload(slot)\n if iszero(handler) {\n return(0, 0)\n }\n calldatacopy(0, 0, calldatasize())\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n mstore(calldatasize(), shl(96, caller()))\n // Add 20 bytes for the address appended add the end\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if iszero(success) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\n\ninterface Guard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract GuardManager is SelfAuthorized {\n event ChangedGuard(address guard);\n // keccak256(\"guard_manager.guard.address\")\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address guard) external authorized {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, guard)\n }\n emit ChangedGuard(guard);\n }\n\n function getGuard() internal view returns (address guard) {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n guard := sload(slot)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\nimport \"./Executor.sol\";\n\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract ModuleManager is SelfAuthorized, Executor {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n address internal constant SENTINEL_MODULES = address(0x1);\n\n mapping(address => address) internal modules;\n\n function setupModules(address to, bytes memory data) internal {\n require(modules[SENTINEL_MODULES] == address(0), \"GS100\");\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n if (to != address(0))\n // Setup has to complete successfully or transaction fails.\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \"GS000\");\n }\n\n /// @dev Allows to add a module to the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Enables the module `module` for the Safe.\n /// @param module Module to be whitelisted.\n function enableModule(address module) public authorized {\n // Module address cannot be null or sentinel.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n // Module cannot be added twice.\n require(modules[module] == address(0), \"GS102\");\n modules[module] = modules[SENTINEL_MODULES];\n modules[SENTINEL_MODULES] = module;\n emit EnabledModule(module);\n }\n\n /// @dev Allows to remove a module from the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Disables the module `module` for the Safe.\n /// @param prevModule Module that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) public authorized {\n // Validate module address and check that it corresponds to module index.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n require(modules[prevModule] == module, \"GS103\");\n modules[prevModule] = modules[module];\n modules[module] = address(0);\n emit DisabledModule(module);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public virtual returns (bool success) {\n // Only whitelisted modules are allowed.\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \"GS104\");\n // Execute transaction without further confirmations.\n success = execute(to, value, data, operation, gasleft());\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) public view returns (bool) {\n return SENTINEL_MODULES != module && modules[module] != address(0);\n }\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 moduleCount = 0;\n address currentModule = modules[start];\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\n array[moduleCount] = currentModule;\n currentModule = modules[currentModule];\n moduleCount++;\n }\n next = currentModule;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, moduleCount)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract OwnerManager is SelfAuthorized {\n event AddedOwner(address owner);\n event RemovedOwner(address owner);\n event ChangedThreshold(uint256 threshold);\n\n address internal constant SENTINEL_OWNERS = address(0x1);\n\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\n // Threshold can only be 0 at initialization.\n // Check ensures that setup function can only be called once.\n require(threshold == 0, \"GS200\");\n // Validate that threshold is smaller than number of added owners.\n require(_threshold <= _owners.length, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n // Initializing Safe owners.\n address currentOwner = SENTINEL_OWNERS;\n for (uint256 i = 0; i < _owners.length; i++) {\n // Owner address cannot be null.\n address owner = _owners[i];\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[currentOwner] = owner;\n currentOwner = owner;\n }\n owners[currentOwner] = SENTINEL_OWNERS;\n ownerCount = _owners.length;\n threshold = _threshold;\n }\n\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\n /// @param owner New owner address.\n /// @param _threshold New threshold.\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[owner] = owners[SENTINEL_OWNERS];\n owners[SENTINEL_OWNERS] = owner;\n ownerCount++;\n emit AddedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\n /// @param owner Owner address to be removed.\n /// @param _threshold New threshold.\n function removeOwner(\n address prevOwner,\n address owner,\n uint256 _threshold\n ) public authorized {\n // Only allow to remove an owner, if threshold can still be reached.\n require(ownerCount - 1 >= _threshold, \"GS201\");\n // Validate owner address and check that it corresponds to owner index.\n require(owner != address(0) && owner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == owner, \"GS205\");\n owners[prevOwner] = owners[owner];\n owners[owner] = address(0);\n ownerCount--;\n emit RemovedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to swap/replace an owner from the Safe with another address.\n /// This can only be done via a Safe transaction.\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n function swapOwner(\n address prevOwner,\n address oldOwner,\n address newOwner\n ) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[newOwner] == address(0), \"GS204\");\n // Validate oldOwner address and check that it corresponds to owner index.\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == oldOwner, \"GS205\");\n owners[newOwner] = owners[oldOwner];\n owners[prevOwner] = newOwner;\n owners[oldOwner] = address(0);\n emit RemovedOwner(oldOwner);\n emit AddedOwner(newOwner);\n }\n\n /// @dev Allows to update the number of required confirmations by Safe owners.\n /// This can only be done via a Safe transaction.\n /// @notice Changes the threshold of the Safe to `_threshold`.\n /// @param _threshold New threshold.\n function changeThreshold(uint256 _threshold) public authorized {\n // Validate that threshold is smaller than number of owners.\n require(_threshold <= ownerCount, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n threshold = _threshold;\n emit ChangedThreshold(threshold);\n }\n\n function getThreshold() public view returns (uint256) {\n return threshold;\n }\n\n function isOwner(address owner) public view returns (bool) {\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\n }\n\n /// @dev Returns array of owners.\n /// @return Array of Safe owners.\n function getOwners() public view returns (address[] memory) {\n address[] memory array = new address[](ownerCount);\n\n // populate return array\n uint256 index = 0;\n address currentOwner = owners[SENTINEL_OWNERS];\n while (currentOwner != SENTINEL_OWNERS) {\n array[index] = currentOwner;\n currentOwner = owners[currentOwner];\n index++;\n }\n return array;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\n/// @author Richard Meissner - \ncontract EtherPaymentFallback {\n event SafeReceived(address indexed sender, uint256 value);\n\n /// @dev Fallback function accepts Ether transactions.\n receive() external payable {\n emit SafeReceived(msg.sender, msg.value);\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SecuredTokenTransfer - Secure token transfer\n/// @author Richard Meissner - \ncontract SecuredTokenTransfer {\n /// @dev Transfers a token and returns if it was a success\n /// @param token Token that should be transferred\n /// @param receiver Receiver to whom the token should be transferred\n /// @param amount The amount of tokens that should be transferred\n function transferToken(\n address token,\n address receiver,\n uint256 amount\n ) internal returns (bool transferred) {\n // 0xa9059cbb - keccack(\"transfer(address,uint256)\")\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // We write the return value to scratch space.\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n switch returndatasize()\n case 0 {\n transferred := success\n }\n case 0x20 {\n transferred := iszero(or(iszero(success), iszero(mload(0))))\n }\n default {\n transferred := 0\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - \ncontract SelfAuthorized {\n function requireSelfCall() private view {\n require(msg.sender == address(this), \"GS031\");\n }\n\n modifier authorized() {\n // This is a function call as it minimized the bytecode size\n requireSelfCall();\n _;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\n/// @author Richard Meissner - \ncontract SignatureDecoder {\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Singleton.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\n/// @author Richard Meissner - \ncontract Singleton {\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\n // It should also always be ensured that the address is stored alone (uses a full word)\n address private singleton;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\ncontract StorageAccessible {\n /**\n * @dev Reads `length` bytes of storage in the currents contract\n * @param offset - the offset in the current contract's storage in words to start reading from\n * @param length - the number of words (32 bytes) of data to read\n * @return the bytes that were read.\n */\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\n bytes memory result = new bytes(length * 32);\n for (uint256 index = 0; index < length; index++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let word := sload(add(offset, index))\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n }\n }\n return result;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static).\n *\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\n * Specifically, the `returndata` after a call to this method will be:\n * `success:bool || response.length:uint256 || response:bytes`.\n *\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\n\n mstore(0x00, success)\n mstore(0x20, returndatasize())\n returndatacopy(0x40, 0, returndatasize())\n revert(0, add(returndatasize(), 0x40))\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/GnosisSafeStorage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title GnosisSafeStorage - Storage layout of the Safe contracts to be used in libraries\n/// @author Richard Meissner - \ncontract GnosisSafeStorage {\n // From /common/Singleton.sol\n address internal singleton;\n // From /common/ModuleManager.sol\n mapping(address => address) internal modules;\n // From /common/OwnerManager.sol\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n // From /GnosisSafe.sol\n bytes32 internal nonce;\n bytes32 internal domainSeparator;\n mapping(bytes32 => uint256) internal signedMessages;\n mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeStorage.sol\";\nimport \"../../GnosisSafe.sol\";\n\n/// @title SignMessageLib - Allows to set an entry in the signedMessages\n/// @author Richard Meissner - \ncontract SignMessageLib is GnosisSafeStorage {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n event SignMsg(bytes32 indexed msgHash);\n\n /// @dev Marks a message as signed, so that it can be used with EIP-1271\n /// @notice Marks a message (`_data`) as signed.\n /// @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)\n function signMessage(bytes calldata _data) external {\n bytes32 msgHash = getMessageHash(_data);\n signedMessages[msgHash] = 1;\n emit SignMsg(msgHash);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return\n keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), GnosisSafe(payable(address(this))).domainSeparator(), safeMessageHash));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title GnosisSafeMath\n * @dev Math operations with safety checks that revert on error\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\n * TODO: remove once open zeppelin update to solc 0.5.0\n */\nlibrary GnosisSafeMath {\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./base/ModuleManager.sol\";\nimport \"./base/OwnerManager.sol\";\nimport \"./base/FallbackManager.sol\";\nimport \"./base/GuardManager.sol\";\nimport \"./common/EtherPaymentFallback.sol\";\nimport \"./common/Singleton.sol\";\nimport \"./common/SignatureDecoder.sol\";\nimport \"./common/SecuredTokenTransfer.sol\";\nimport \"./common/StorageAccessible.sol\";\nimport \"./interfaces/ISignatureValidator.sol\";\nimport \"./external/GnosisSafeMath.sol\";\n\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafe is\n EtherPaymentFallback,\n Singleton,\n ModuleManager,\n OwnerManager,\n SignatureDecoder,\n SecuredTokenTransfer,\n ISignatureValidatorConstants,\n FallbackManager,\n StorageAccessible,\n GuardManager\n{\n using GnosisSafeMath for uint256;\n\n string public constant VERSION = \"1.3.0\";\n\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n // keccak256(\n // \"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\"\n // );\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\n\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\n event SignMsg(bytes32 indexed msgHash);\n event ExecutionFailure(bytes32 txHash, uint256 payment);\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\n\n uint256 public nonce;\n bytes32 private _deprecatedDomainSeparator;\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\n mapping(bytes32 => uint256) public signedMessages;\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\n\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\n constructor() {\n // By setting the threshold it is not possible to call setup anymore,\n // so we create a Safe with 0 owners and threshold 1.\n // This is an unusable Safe, perfect for the singleton\n threshold = 1;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n /// @param to Contract address for optional delegate call.\n /// @param data Data payload for optional delegate call.\n /// @param fallbackHandler Handler for fallback calls to this contract\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\n function setup(\n address[] calldata _owners,\n uint256 _threshold,\n address to,\n bytes calldata data,\n address fallbackHandler,\n address paymentToken,\n uint256 payment,\n address payable paymentReceiver\n ) external {\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\n setupOwners(_owners, _threshold);\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\n setupModules(to, data);\n\n if (payment > 0) {\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\n }\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\n }\n\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\n /// Note: The fees are always transferred, even if the user transaction fails.\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @param safeTxGas Gas that should be used for the Safe transaction.\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Gas price that should be used for the payment calculation.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\n function execTransaction(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures\n ) public payable virtual returns (bool success) {\n bytes32 txHash;\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n bytes memory txHashData =\n encodeTransactionData(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n nonce\n );\n // Increase nonce and execute transaction.\n nonce++;\n txHash = keccak256(txHashData);\n checkSignatures(txHash, txHashData, signatures);\n }\n address guard = getGuard();\n {\n if (guard != address(0)) {\n Guard(guard).checkTransaction(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n signatures,\n msg.sender\n );\n }\n }\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \"GS010\");\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n uint256 gasUsed = gasleft();\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\n gasUsed = gasUsed.sub(gasleft());\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\n require(success || safeTxGas != 0 || gasPrice != 0, \"GS013\");\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\n uint256 payment = 0;\n if (gasPrice > 0) {\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\n }\n if (success) emit ExecutionSuccess(txHash, payment);\n else emit ExecutionFailure(txHash, payment);\n }\n {\n if (guard != address(0)) {\n Guard(guard).checkAfterExecution(txHash, success);\n }\n }\n }\n\n function handlePayment(\n uint256 gasUsed,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver\n ) private returns (uint256 payment) {\n // solhint-disable-next-line avoid-tx-origin\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\n if (gasToken == address(0)) {\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\n require(receiver.send(payment), \"GS011\");\n } else {\n payment = gasUsed.add(baseGas).mul(gasPrice);\n require(transferToken(gasToken, receiver, payment), \"GS012\");\n }\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n */\n function checkSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures\n ) public view {\n // Load threshold to avoid multiple storage loads\n uint256 _threshold = threshold;\n // Check that a threshold is set\n require(_threshold > 0, \"GS001\");\n checkNSignatures(dataHash, data, signatures, _threshold);\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n * @param requiredSignatures Amount of required valid signatures.\n */\n function checkNSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures,\n uint256 requiredSignatures\n ) public view {\n // Check that the provided signature data is not too short\n require(signatures.length >= requiredSignatures.mul(65), \"GS020\");\n // There cannot be an owner with address 0.\n address lastOwner = address(0);\n address currentOwner;\n uint8 v;\n bytes32 r;\n bytes32 s;\n uint256 i;\n for (i = 0; i < requiredSignatures; i++) {\n (v, r, s) = signatureSplit(signatures, i);\n if (v == 0) {\n // If v is 0 then it is a contract signature\n // When handling contract signatures the address of the contract is encoded into r\n currentOwner = address(uint160(uint256(r)));\n\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\n // Here we only check that the pointer is not pointing inside the part that is being processed\n require(uint256(s) >= requiredSignatures.mul(65), \"GS021\");\n\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\n require(uint256(s).add(32) <= signatures.length, \"GS022\");\n\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\n uint256 contractSignatureLen;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\n }\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \"GS023\");\n\n // Check signature\n bytes memory contractSignature;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\n contractSignature := add(add(signatures, s), 0x20)\n }\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \"GS024\");\n } else if (v == 1) {\n // If v is 1 then it is an approved hash\n // When handling approved hashes the address of the approver is encoded into r\n currentOwner = address(uint160(uint256(r)));\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \"GS025\");\n } else if (v > 30) {\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\n currentOwner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", dataHash)), v - 4, r, s);\n } else {\n // Default is the ecrecover flow with the provided data hash\n // Use ecrecover with the messageHash for EOA signatures\n currentOwner = ecrecover(dataHash, v, r, s);\n }\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \"GS026\");\n lastOwner = currentOwner;\n }\n }\n\n /// @dev Allows to estimate a Safe transaction.\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\n function requiredTxGas(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation\n ) external returns (uint256) {\n uint256 startGas = gasleft();\n // We don't provide an error message here, as we use it to return the estimate\n require(execute(to, value, data, operation, gasleft()));\n uint256 requiredGas = startGas - gasleft();\n // Convert response to string and return via error message\n revert(string(abi.encodePacked(requiredGas)));\n }\n\n /**\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\n */\n function approveHash(bytes32 hashToApprove) external {\n require(owners[msg.sender] != address(0), \"GS030\");\n approvedHashes[msg.sender][hashToApprove] = 1;\n emit ApproveHash(hashToApprove, msg.sender);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n function domainSeparator() public view returns (bytes32) {\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\n }\n\n /// @dev Returns the bytes that are hashed to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Gas that should be used for the safe transaction.\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash bytes.\n function encodeTransactionData(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes memory) {\n bytes32 safeTxHash =\n keccak256(\n abi.encode(\n SAFE_TX_TYPEHASH,\n to,\n value,\n keccak256(data),\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n _nonce\n )\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\n }\n\n /// @dev Returns hash to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Fas that should be used for the safe transaction.\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash.\n function getTransactionHash(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes32) {\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./DefaultCallbackHandler.sol\";\nimport \"../interfaces/ISignatureValidator.sol\";\nimport \"../GnosisSafe.sol\";\n\n/// @title Compatibility Fallback Handler - fallback handler to provider compatibility between pre 1.3.0 and 1.3.0+ Safe contracts\n/// @author Richard Meissner - \ncontract CompatibilityFallbackHandler is DefaultCallbackHandler, ISignatureValidator {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256(\"simulate(address,bytes)\"));\n\n address internal constant SENTINEL_MODULES = address(0x1);\n bytes4 internal constant UPDATED_MAGIC_VALUE = 0x1626ba7e;\n\n /**\n * Implementation of ISignatureValidator (see `interfaces/ISignatureValidator.sol`)\n * @dev Should return whether the signature provided is valid for the provided data.\n * @param _data Arbitrary length data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _data\n * @return a bool upon valid or invalid signature with corresponding _data\n */\n function isValidSignature(bytes calldata _data, bytes calldata _signature) public view override returns (bytes4) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n bytes32 messageHash = getMessageHashForSafe(safe, _data);\n if (_signature.length == 0) {\n require(safe.signedMessages(messageHash) != 0, \"Hash not approved\");\n } else {\n safe.checkSignatures(messageHash, _data, _signature);\n }\n return EIP1271_MAGIC_VALUE;\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n return getMessageHashForSafe(GnosisSafe(payable(msg.sender)), message);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param safe Safe to which the message is targeted\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHashForSafe(GnosisSafe safe, bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), safe.domainSeparator(), safeMessageHash));\n }\n\n /**\n * Implementation of updated EIP-1271\n * @dev Should return whether the signature provided is valid for the provided data.\n * The save does not implement the interface since `checkSignatures` is not a view method.\n * The method will not perform any state changes (see parameters of `checkSignatures`)\n * @param _dataHash Hash of the data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _dataHash\n * @return a bool upon valid or invalid signature with corresponding _dataHash\n * @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\n */\n function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view returns (bytes4) {\n ISignatureValidator validator = ISignatureValidator(msg.sender);\n bytes4 value = validator.isValidSignature(abi.encode(_dataHash), _signature);\n return (value == EIP1271_MAGIC_VALUE) ? UPDATED_MAGIC_VALUE : bytes4(0);\n }\n\n /// @dev Returns array of first 10 modules.\n /// @return Array of modules.\n function getModules() external view returns (address[] memory) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n (address[] memory array, ) = safe.getModulesPaginated(SENTINEL_MODULES, 10);\n return array;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulate(address targetContract, bytes calldata calldataPayload) external returns (bytes memory response) {\n // Suppress compiler warnings about not using parameters, while allowing\n // parameters to keep names for documentation purposes. This does not\n // generate code.\n targetContract;\n calldataPayload;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let internalCalldata := mload(0x40)\n // Store `simulateAndRevert.selector`.\n // String representation is used to force right padding\n mstore(internalCalldata, \"\\xb4\\xfa\\xba\\x09\")\n // Abuse the fact that both this and the internal methods have the\n // same signature, and differ only in symbol name (and therefore,\n // selector) and copy calldata directly. This saves us approximately\n // 250 bytes of code and 300 gas at runtime over the\n // `abi.encodeWithSelector` builtin.\n calldatacopy(add(internalCalldata, 0x04), 0x04, sub(calldatasize(), 0x04))\n\n // `pop` is required here by the compiler, as top level expressions\n // can't have return values in inline assembly. `call` typically\n // returns a 0 or 1 value indicated whether or not it reverted, but\n // since we know it will always revert, we can safely ignore it.\n pop(\n call(\n gas(),\n // address() has been changed to caller() to use the implementation of the Safe\n caller(),\n 0,\n internalCalldata,\n calldatasize(),\n // The `simulateAndRevert` call always reverts, and\n // instead encodes whether or not it was successful in the return\n // data. The first 32-byte word of the return data contains the\n // `success` value, so write it to memory address 0x00 (which is\n // reserved Solidity scratch space and OK to use).\n 0x00,\n 0x20\n )\n )\n\n // Allocate and copy the response bytes, making sure to increment\n // the free memory pointer accordingly (in case this method is\n // called as an internal function). The remaining `returndata[0x20:]`\n // contains the ABI encoded response bytes, so we can just write it\n // as is to memory.\n let responseSize := sub(returndatasize(), 0x20)\n response := mload(0x40)\n mstore(0x40, add(response, responseSize))\n returndatacopy(response, 0x20, responseSize)\n\n if iszero(mload(0x00)) {\n revert(add(response, 0x20), mload(response))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/DefaultCallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/ERC1155TokenReceiver.sol\";\nimport \"../interfaces/ERC721TokenReceiver.sol\";\nimport \"../interfaces/ERC777TokensRecipient.sol\";\nimport \"../interfaces/IERC165.sol\";\n\n/// @title Default Callback Handler - returns true for known token callbacks\n/// @author Richard Meissner - \ncontract DefaultCallbackHandler is ERC1155TokenReceiver, ERC777TokensRecipient, ERC721TokenReceiver, IERC165 {\n string public constant NAME = \"Default Callback Handler\";\n string public constant VERSION = \"1.0.0\";\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xbc197c81;\n }\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0x150b7a02;\n }\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n ) external pure override {\n // We implement this for completeness, doesn't really have any value\n }\n\n function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {\n return\n interfaceId == type(ERC1155TokenReceiver).interfaceId ||\n interfaceId == type(ERC721TokenReceiver).interfaceId ||\n interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC1155TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\n*/\ninterface ERC1155TokenReceiver {\n /**\n @notice Handle the receipt of a single ERC1155 token type.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\n This function MUST revert if it rejects the transfer.\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _id The ID of the token being transferred\n @param _value The amount of tokens being transferred\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 _id,\n uint256 _value,\n bytes calldata _data\n ) external returns (bytes4);\n\n /**\n @notice Handle the receipt of multiple ERC1155 token types.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\n This function MUST revert if it rejects the transfer(s).\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata _ids,\n uint256[] calldata _values,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC777TokensRecipient.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface ERC777TokensRecipient {\n function tokensReceived(\n address operator,\n address from,\n address to,\n uint256 amount,\n bytes calldata data,\n bytes calldata operatorData\n ) external;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @notice More details at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ncontract ISignatureValidatorConstants {\n // bytes4(keccak256(\"isValidSignature(bytes,bytes)\")\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\n}\n\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n *\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - \n/// @author Gonçalo Sá - \n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract MultiSend {\n address private immutable multisendSingleton;\n\n constructor() {\n multisendSingleton = address(this);\n }\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions. Each transaction is encoded as a packed bytes of\n /// operation as a uint8 with 0 for a call or 1 for a delegatecall (=> 1 byte),\n /// to as a address (=> 20 bytes),\n /// value as a uint256 (=> 32 bytes),\n /// data length as a uint256 (=> 32 bytes),\n /// data as bytes.\n /// see abi.encodePacked for more information on packed encoding\n /// @notice This method is payable as delegatecalls keep the msg.value from the previous call\n /// If the calling method (e.g. execTransaction) received ETH this would revert otherwise\n function multiSend(bytes memory transactions) public payable {\n require(address(this) != multisendSingleton, \"MultiSend should only be called via delegatecall\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let length := mload(transactions)\n let i := 0x20\n for {\n // Pre block is not used in \"while mode\"\n } lt(i, length) {\n // Post block is not used in \"while mode\"\n } {\n // First byte of the data is the operation.\n // We shift by 248 bits (256 - 8 [operation byte]) it right since mload will always load 32 bytes (a word).\n // This will also zero out unused data.\n let operation := shr(0xf8, mload(add(transactions, i)))\n // We offset the load address by 1 byte (operation byte)\n // We shift it right by 96 bits (256 - 160 [20 address bytes]) to right-align the data and zero out unused data.\n let to := shr(0x60, mload(add(transactions, add(i, 0x01))))\n // We offset the load address by 21 byte (operation byte + 20 address bytes)\n let value := mload(add(transactions, add(i, 0x15)))\n // We offset the load address by 53 byte (operation byte + 20 address bytes + 32 value bytes)\n let dataLength := mload(add(transactions, add(i, 0x35)))\n // We offset the load address by 85 byte (operation byte + 20 address bytes + 32 value bytes + 32 data length bytes)\n let data := add(transactions, add(i, 0x55))\n let success := 0\n switch operation\n case 0 {\n success := call(gas(), to, value, data, dataLength, 0, 0)\n }\n case 1 {\n success := delegatecall(gas(), to, data, dataLength, 0, 0)\n }\n if eq(success, 0) {\n revert(0, 0)\n }\n // Next entry starts at 85 byte + data length\n i := add(i, add(0x55, dataLength))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\n/// @author Richard Meissner - \ninterface IProxy {\n function masterCopy() external view returns (address);\n}\n\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafeProxy {\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\n address internal singleton;\n\n /// @dev Constructor function sets address of singleton contract.\n /// @param _singleton Singleton address.\n constructor(address _singleton) {\n require(_singleton != address(0), \"Invalid singleton address provided\");\n singleton = _singleton;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n fallback() external payable {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n // 0xa619486e == keccak(\"masterCopy()\"). The value is right padded to 32-bytes with 0s\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\n mstore(0, _singleton)\n return(0, 0x20)\n }\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeProxy.sol\";\nimport \"./IProxyCreationCallback.sol\";\n\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n/// @author Stefan George - \ncontract GnosisSafeProxyFactory {\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param singleton Address of singleton contract.\n /// @param data Payload for message call sent to new proxy contract.\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\n proxy = new GnosisSafeProxy(singleton);\n if (data.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, singleton);\n }\n\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\n function proxyRuntimeCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).runtimeCode;\n }\n\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\n function proxyCreationCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).creationCode;\n }\n\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\n /// This method is only meant as an utility to be called from other methods\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function deployProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) internal returns (GnosisSafeProxy proxy) {\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\n // solhint-disable-next-line no-inline-assembly\n assembly {\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\n }\n require(address(proxy) != address(0), \"Create2 call failed\");\n }\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function createProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n if (initializer.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, _singleton);\n }\n\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\n function createProxyWithCallback(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce,\n IProxyCreationCallback callback\n ) public returns (GnosisSafeProxy proxy) {\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\n }\n\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function calculateCreateProxyWithNonceAddress(\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n revert(string(abi.encodePacked(proxy)));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"./GnosisSafeProxy.sol\";\n\ninterface IProxyCreationCallback {\n function proxyCreated(\n GnosisSafeProxy proxy,\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n (success, ) = _exec(to, value, data, operation);\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n (success, returnData) = _exec(to, value, data, operation);\n }\n\n function _exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) private returns (bool success, bytes memory returnData) {\n address currentGuard = guard;\n if (currentGuard != address(0)) {\n IGuard(currentGuard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n \"\",\n msg.sender\n );\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n IGuard(currentGuard).checkAfterExecution(\"\", success);\n } else {\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n }\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract ModuleProxyFactory {\n event ModuleProxyCreation(\n address indexed proxy,\n address indexed masterCopy\n );\n\n /// `target` can not be zero.\n error ZeroAddress(address target);\n\n /// `target` has no code deployed.\n error TargetHasNoCode(address target);\n\n /// `address_` is already taken.\n error TakenAddress(address address_);\n\n /// @notice Initialization failed.\n error FailedInitialization();\n\n function createProxy(address target, bytes32 salt)\n internal\n returns (address result)\n {\n if (address(target) == address(0)) revert ZeroAddress(target);\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\n bytes memory deployment = abi.encodePacked(\n hex\"602d8060093d393df3363d3d373d3d3d363d73\",\n target,\n hex\"5af43d82803e903d91602b57fd5bf3\"\n );\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\n }\n if (result == address(0)) revert TakenAddress(result);\n }\n\n function deployModule(\n address masterCopy,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (address proxy) {\n proxy = createProxy(\n masterCopy,\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\n );\n (bool success, ) = proxy.call(initializer);\n if (!success) revert FailedInitialization();\n\n emit ModuleProxyCreation(proxy, masterCopy);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@opengsn/contracts/src/BaseRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable no-inline-assembly\npragma solidity >=0.6.9;\n\nimport \"./interfaces/IRelayRecipient.sol\";\n\n/**\n * A base contract to be inherited by any contract that want to receive relayed transactions\n * A subclass must use \"_msgSender()\" instead of \"msg.sender\"\n */\nabstract contract BaseRelayRecipient is IRelayRecipient {\n\n /*\n * Forwarder singleton we accept calls from\n */\n address private _trustedForwarder;\n\n function trustedForwarder() public virtual view returns (address){\n return _trustedForwarder;\n }\n\n function _setTrustedForwarder(address _forwarder) internal {\n _trustedForwarder = _forwarder;\n }\n\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\n return forwarder == _trustedForwarder;\n }\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, return the original sender.\n * otherwise, return `msg.sender`.\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal override virtual view returns (address ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n // At this point we know that the sender is a trusted forwarder,\n // so we trust that the last bytes of msg.data are the verified sender address.\n // extract sender address from the end of msg.data\n assembly {\n ret := shr(96,calldataload(sub(calldatasize(),20)))\n }\n } else {\n ret = msg.sender;\n }\n }\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal override virtual view returns (bytes calldata ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n return msg.data[0:msg.data.length-20];\n } else {\n return msg.data;\n }\n }\n}\n" + }, + "@opengsn/contracts/src/interfaces/IRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\n/**\n * a contract must implement this interface in order to support relayed transaction.\n * It is better to inherit the BaseRelayRecipient as its implementation.\n */\nabstract contract IRelayRecipient {\n\n /**\n * return if the forwarder is trusted to forward relayed transactions to us.\n * the forwarder is required to verify the sender's signature, and verify\n * the call is not a replay.\n */\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\n * of the msg.data.\n * otherwise, return `msg.sender`\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal virtual view returns (address);\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal virtual view returns (bytes calldata);\n\n function versionRecipient() external virtual view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private constant _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n /**\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n * However, to ensure consistency with the upgradeable transpiler, we will continue\n * to reserve a slot.\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\n */\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\n __EIP712_init_unchained(name, \"1\");\n }\n\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n function __ERC20Snapshot_init() internal onlyInitializing {\n }\n\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n }\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using ArraysUpgradeable for uint256[];\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n CountersUpgradeable.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./StorageSlotUpgradeable.sol\";\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n using StorageSlotUpgradeable for bytes32;\n\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (unsafeAccess(array, mid).value > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getAddressSlot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getBytes32Slot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getUint256Slot();\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\n\nimport \"./EIP712Upgradeable.sol\";\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlotUpgradeable {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/Clones.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address implementation, bytes32 salt)\n internal\n view\n returns (address predicted)\n {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "contracts/Baal.sol": { + "content": "// SPDX-License-Identifier: MIT\n/*\n███ ██ ██ █\n█ █ █ █ █ █ █\n█ ▀ ▄ █▄▄█ █▄▄█ █\n█ ▄▀ █ █ █ █ ███▄\n███ █ █ ▀\n █ █\n ▀ ▀*/\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\";\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@opengsn/contracts/src/BaseRelayRecipient.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\nimport \"./interfaces/IBaalToken.sol\";\n\n/// @title Baal ';_;'.\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\n using ECDSAUpgradeable for bytes32;\n\n // ERC20 SHARES + LOOT\n\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\n\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\n\n // GOVERNANCE PARAMS\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\n uint256 public proposalOffering; /* non-member proposal offering*/\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\n\n // SHAMAN PERMISSIONS\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\n /* permissions registry for shamans\n 0 = no permission\n 1 = admin only\n 2 = manager only\n 4 = governance only\n 3 = admin + manager\n 5 = admin + governance\n 6 = manager + governance\n 7 = admin + manager + governance */\n\n // PROPOSAL TRACKING\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\n\n // MISCELLANEOUS PARAMS\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\n address public multisendLibrary; /*address of multisend library*/\n string public override versionRecipient; /* version recipient for OpenGSN */\n\n // SIGNATURE HELPERS\n bytes32 constant VOTE_TYPEHASH = keccak256(\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\");\n\n // DATA STRUCTURES\n struct Proposal {\n /*Baal proposal details*/\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\n uint256 baalGas; /* gas needed to process proposal */\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\n }\n\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n \\-> Cancelled \\-> Defeated */\n enum ProposalState {\n Unborn, /* 0 - can submit */\n Submitted, /* 1 - can sponsor -> voting */\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\n Cancelled, /* 3 - terminal state, counts as processed */\n Grace, /* 4 - proceeds to ready/defeated */\n Ready, /* 5 - can be processed */\n Processed, /* 6 - terminal state */\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\n }\n\n // MODIFIERS\n\n modifier baalOnly() {\n require(_msgSender() == avatar, \"!baal\");\n _;\n }\n\n modifier baalOrAdminOnly() {\n require(_msgSender() == avatar || isAdmin(_msgSender()), \"!baal & !admin\"); /*check `shaman` is admin*/\n _;\n }\n\n modifier baalOrManagerOnly() {\n require(\n _msgSender() == avatar || isManager(_msgSender()),\n \"!baal & !manager\"\n ); /*check `shaman` is manager*/\n _;\n }\n\n modifier baalOrGovernorOnly() {\n require(\n _msgSender() == avatar || isGovernor(_msgSender()),\n \"!baal & !governor\"\n ); /*check `shaman` is governor*/\n _;\n }\n\n // EVENTS\n event SetupComplete(\n bool lootPaused,\n bool sharesPaused,\n uint32 gracePeriod,\n uint32 votingPeriod,\n uint256 proposalOffering,\n uint256 quorumPercent,\n uint256 sponsorThreshold,\n uint256 minRetentionPercent,\n string name,\n string symbol,\n uint256 totalShares,\n uint256 totalLoot\n ); /*emits after Baal summoning*/\n event SubmitProposal(\n uint256 indexed proposal,\n bytes32 indexed proposalDataHash,\n uint256 votingPeriod,\n bytes proposalData,\n uint256 expiration,\n uint256 baalGas,\n bool selfSponsor,\n uint256 timestamp,\n string details\n ); /*emits after proposal is submitted*/\n event SponsorProposal(\n address indexed member,\n uint256 indexed proposal,\n uint256 indexed votingStarts\n ); /*emits after member has sponsored proposal*/\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\n event SubmitVote(\n address indexed member,\n uint256 balance,\n uint256 indexed proposal,\n bool indexed approved\n ); /*emits after vote is submitted on proposal*/\n event ProcessProposal(\n uint256 indexed proposal,\n bool passed,\n bool actionFailed\n ); /*emits when proposal is processed & executed*/\n event Ragequit(\n address indexed member,\n address to,\n uint256 indexed lootToBurn,\n uint256 indexed sharesToBurn,\n address[] tokens\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 amount\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\n\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\n event GovernanceConfigSet(\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ); /*emits when gov config changes*/\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\n event LockManager(bool managerLock); /*emits when admin is locked*/\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\n /// @param _initializationParams Encoded setup information.\n function setUp(bytes memory _initializationParams)\n public\n override(FactoryFriendly)\n initializer\n nonReentrant\n {\n (\n address _lootToken, /*loot ERC20 token*/\n address _sharesToken, /*shares ERC20 token*/\n address _multisendLibrary, /*address of multisend library*/\n address _avatar, /*Safe contract address*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\n ) = abi.decode(\n _initializationParams,\n (address, address, address, address, address, bytes)\n );\n\n require(\n _multisendLibrary != address(0) &&\n _avatar != address(0),\n \"0 addr used\"\n );\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\n\n versionRecipient = \"2.2.5+opengsn.payablewithbaal.irelayrecipient\";\n __Ownable_init();\n __ReentrancyGuard_init();\n __EIP712_init(\"Vote\", \"4\");\n transferOwnership(_avatar);\n\n // Set the Gnosis safe address\n avatar = _avatar;\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\n\n // Set trusted forwarder\n _setTrustedForwarder(_forwarder);\n\n lootToken = IBaalToken(_lootToken);\n sharesToken = IBaalToken(_sharesToken);\n\n /*Set address of Gnosis multisend library to use for all execution*/\n multisendLibrary = _multisendLibrary;\n\n // Execute all setups including but not limited to\n // * mint shares\n // * convert shares to loot\n // * set shamans\n // * set admin configurations\n require(\n exec(\n multisendLibrary,\n 0,\n _initializationMultisendData,\n Enum.Operation.DelegateCall\n ),\n \"call failure setup\"\n );\n\n emit SetupComplete(\n lootToken.paused(),\n sharesToken.paused(),\n gracePeriod,\n votingPeriod,\n proposalOffering,\n quorumPercent,\n sponsorThreshold,\n minRetentionPercent,\n sharesToken.name(),\n sharesToken.symbol(),\n totalShares(),\n totalLoot()\n );\n\n }\n\n /*****************\n PROPOSAL FUNCTIONS\n *****************/\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\n /// @param proposalData Multisend encoded transactions or proposal data\n /// @param details Context for proposal.\n /// @return proposal Count for submitted proposal.\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable nonReentrant returns (uint256) {\n require(\n expiration == 0 ||\n expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n require(baalGas <= 20000000, \"baalGas to high\"); /* gwei 2/3 eth block limit */\n\n bool selfSponsor = false; /*plant sponsor flag*/\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\n } else {\n require(msg.value == proposalOffering, \"Baal requires an offering\"); /*Optional anti-spam gas token tribute*/\n (bool _success, ) = target.call{value: msg.value}(\"\"); /*Send ETH to sink*/\n require(_success, \"could not send\");\n }\n\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\n\n proposalCount++; /*increment proposal counter*/\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\n proposalCount,\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\n selfSponsor\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\n : 0, /* graceEnds */\n expiration,\n baalGas,\n 0, /* yes votes */\n 0, /* no votes */\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\n selfSponsor ? _msgSender() : address(0),\n proposalDataHash\n );\n\n if (selfSponsor) {\n latestSponsoredProposalId = proposalCount;\n }\n\n emit SubmitProposal(\n proposalCount,\n proposalDataHash,\n votingPeriod,\n proposalData,\n expiration,\n baalGas,\n selfSponsor,\n block.timestamp,\n details\n ); /*emit event reflecting proposal submission*/\n\n return proposalCount;\n }\n\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\n /// @param id Number of proposal in `proposals` mapping to sponsor.\n function sponsorProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \"!sponsor\"); /*check 'votes > threshold - required to sponsor proposal*/\n require(state(id) == ProposalState.Submitted, \"!submitted\");\n require(\n prop.expiration == 0 ||\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n\n prop.votingStarts = uint32(block.timestamp);\n\n unchecked {\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\n prop.graceEnds =\n uint32(block.timestamp) +\n votingPeriod +\n gracePeriod;\n }\n\n prop.prevProposalId = latestSponsoredProposalId;\n prop.sponsor = _msgSender();\n // snapshot both total supply and total shares\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\n latestSponsoredProposalId = id;\n\n emit SponsorProposal(_msgSender(), id, block.timestamp);\n }\n\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function submitVote(uint32 id, bool approved) external nonReentrant {\n _submitVote(_msgSender(), id, approved);\n }\n\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\n /// @param voter Address of member who submitted vote.\n /// @param expiry Expiration of signature.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n /// @param v v in signature\n /// @param r r in signature\n /// @param s s in signature\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external nonReentrant {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n require(nonce == votingNonces[voter], \"!nonce\");\n\n /*calculate EIP-712 struct hash*/\n bytes32 structHash = keccak256(\n abi.encode(\n VOTE_TYPEHASH,\n keccak256(abi.encodePacked(sharesToken.name())),\n voter,\n expiry,\n nonce,\n id,\n approved\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n\n require(signer == voter, \"invalid signature\");\n require(signer != address(0), \"!signer\");\n votingNonces[voter] += 1;\n\n _submitVote(signer, id, approved);\n }\n\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\n /// @param voter Address of voter\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function _submitVote(\n address voter,\n uint32 id,\n bool approved\n ) internal {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n require(state(id) == ProposalState.Voting, \"!voting\");\n\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\n\n require(balance > 0, \"!member\"); /* check that user has shares*/\n require(!memberVoted[voter][id], \"voted\"); /*check vote not already cast*/\n\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\n\n // get high water mark on all votes\n uint256 _totalSupply = totalSupply();\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\n }\n\n unchecked {\n if (approved) {\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\n prop.yesVotes += balance; \n } else {\n /*otherwise, cast delegated balance `noVotes` to proposal*/\n prop.noVotes += balance;\n }\n }\n\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\n }\n\n /// @notice Process `proposal` & execute internal functions.\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n function processProposal(uint32 id, bytes calldata proposalData)\n external\n nonReentrant\n {\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\n\n require(prop.sponsor != address(0), \"!sponsor\"); /*check proposal has been sponsored*/\n require(state(id) == ProposalState.Ready, \"!ready\"); /* check proposal is Ready to process */\n\n ProposalState prevProposalState = state(prop.prevProposalId);\n require(\n prevProposalState == ProposalState.Processed ||\n prevProposalState == ProposalState.Cancelled ||\n prevProposalState == ProposalState.Defeated ||\n prevProposalState == ProposalState.Unborn,\n \"prev!processed\"\n );\n\n // check that the proposalData matches the stored hash\n require(\n hashOperation(proposalData) == prop.proposalDataHash,\n \"incorrect calldata\"\n );\n\n require(\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\n \"not enough gas\"\n );\n\n prop.status[1] = true; /*Set processed flag to true*/\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\n\n // Make proposal fail if after expiration\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\n okToExecute = false;\n\n // Make proposal fail if it didn't pass quorum\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\n okToExecute = false;\n\n // Make proposal fail if the minRetentionPercent is exceeded\n if (\n okToExecute &&\n (totalSupply()) <\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\n ) {\n okToExecute = false;\n }\n\n /*check if `proposal` approved by simple majority of members*/\n if (okToExecute) {\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\n bool success = processActionProposal(proposalData); /*execute 'action'*/\n if (!success) {\n prop.status[3] = true;\n }\n }\n\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\n }\n\n /// @notice Internal function to process 'action'[0] proposal.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n /// @return success Success or failure of execution\n function processActionProposal(bytes memory proposalData)\n private\n returns (bool success)\n {\n success = exec(\n multisendLibrary,\n 0,\n proposalData,\n Enum.Operation.DelegateCall\n );\n }\n\n /// @notice Cancel proposal prior to execution\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n function cancelProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id];\n require(state(id) == ProposalState.Voting, \"!voting\");\n require(\n _msgSender() == prop.sponsor ||\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\n sponsorThreshold ||\n isGovernor(_msgSender()),\n \"!cancellable\"\n );\n prop.status[0] = true;\n emit CancelProposal(id);\n }\n\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\n /// proposal or by a delegated signer on the Safe\n /// @param _to address to call\n /// @param _value value to include in wei\n /// @param _data arbitrary transaction data\n function executeAsBaal(\n address _to,\n uint256 _value,\n bytes calldata _data\n ) external baalOnly {\n (bool success, ) = _to.call{value: _value}(_data);\n require(success, \"call failure execute\");\n }\n\n // ****************\n // MEMBER FUNCTIONS\n // ****************\n\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] calldata tokens\n ) external nonReentrant {\n for (uint256 i = 1; i < tokens.length; i++) {\n require(tokens[i] > tokens[i - 1], \"!order\");\n }\n\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\n }\n\n /// @notice Internal execution of rage quite\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function _ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] memory tokens\n ) internal {\n uint256 _totalSupply = totalSupply();\n\n if (lootToBurn != 0) {\n /*gas optimization*/\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\n }\n\n if (sharesToBurn != 0) {\n /*gas optimization*/\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\n }\n\n for (uint256 i = 0; i < tokens.length; i++) {\n uint256 balance;\n if(tokens[i] == ETH) {\n balance = address(target).balance;\n } else {\n (, bytes memory balanceData) = tokens[i].staticcall(\n abi.encodeWithSelector(0x70a08231, address(target))\n ); /*get Baal token balances - 'balanceOf(address)'*/\n balance = abi.decode(balanceData, (uint256));\n }\n\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\n _totalSupply; /*calculate 'fair shair' claims*/\n\n if (amountToRagequit != 0) {\n /*gas optimization to allow higher maximum token limit*/\n tokens[i] == ETH\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\n }\n }\n\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\n }\n\n /*******************\n GUILD MGMT FUNCTIONS\n *******************/\n /// @notice Baal-only function to set shaman status.\n /// @param _shamans Addresses of shaman contracts\n /// @param _permissions Permission level of each shaman in _shamans\n function setShamans(\n address[] calldata _shamans,\n uint256[] calldata _permissions\n ) external baalOnly {\n require(_shamans.length == _permissions.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < _shamans.length; i++) {\n uint256 permission = _permissions[i];\n if (adminLock)\n require(\n permission != 1 &&\n permission != 3 &&\n permission != 5 &&\n permission != 7,\n \"admin lock\"\n );\n if (managerLock)\n require(\n permission != 2 &&\n permission != 3 &&\n permission != 6 &&\n permission != 7,\n \"manager lock\"\n );\n if (governorLock)\n require(\n permission != 4 &&\n permission != 5 &&\n permission != 6 &&\n permission != 7,\n \"governor lock\"\n );\n shamans[_shamans[i]] = permission;\n emit ShamanSet(_shamans[i], permission);\n }\n }\n\n /// @notice Lock admin so setShamans cannot be called with admin changes\n function lockAdmin() external baalOnly {\n adminLock = true;\n\n emit LockAdmin(adminLock);\n }\n\n /// @notice Lock manager so setShamans cannot be called with manager changes\n function lockManager() external baalOnly {\n managerLock = true;\n\n emit LockManager(managerLock);\n }\n\n /// @notice Lock governor so setShamans cannot be called with governor changes\n function lockGovernor() external baalOnly {\n governorLock = true;\n\n emit LockGovernor(governorLock);\n }\n\n // ****************\n // SHAMAN FUNCTIONS\n // ****************\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\n /// @param pauseShares Turn share transfers on or off\n /// @param pauseLoot Turn loot transfers on or off\n function setAdminConfig(bool pauseShares, bool pauseLoot)\n external\n baalOrAdminOnly\n {\n\n if(pauseShares && !sharesToken.paused()){\n sharesToken.pause();\n emit SharesPaused(true);\n } else if(!pauseShares && sharesToken.paused()){\n sharesToken.unpause();\n emit SharesPaused(false);\n }\n\n if(pauseLoot && !lootToken.paused()){\n lootToken.pause();\n emit LootPaused(true);\n } else if(!pauseLoot && lootToken.paused()){\n lootToken.unpause();\n emit LootPaused(false);\n }\n }\n\n /// @notice Baal-or-manager-only function to mint shares.\n /// @param to Array of addresses to receive shares\n /// @param amount Array of amounts to mint\n function mintShares(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `shares`.\n /// @param to Address to receive shares\n /// @param shares Amount to mint\n function _mintShares(address to, uint256 shares) private {\n sharesToken.mint(to, shares);\n }\n\n /// @notice Baal-or-manager-only function to burn shares.\n /// @param from Array of addresses to lose shares\n /// @param amount Array of amounts to burn\n function burnShares(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `shares`.\n /// @param from Address to lose shares\n /// @param shares Amount to burn\n function _burnShares(address from, uint256 shares) private {\n sharesToken.burn(from, shares);\n }\n\n /// @notice Baal-or-manager-only function to mint loot.\n /// @param to Array of addresses to mint loot\n /// @param amount Array of amounts to mint\n function mintLoot(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `loot`.\n /// @param to Address to mint loot\n /// @param loot Amount to mint\n function _mintLoot(address to, uint256 loot) private {\n lootToken.mint(to, loot);\n }\n\n /// @notice Baal-or-manager-only function to burn loot.\n /// @param from Array of addresses to lose loot\n /// @param amount Array of amounts to burn\n function burnLoot(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `loot`.\n /// @param from Address to lose loot\n /// @param loot Amount to burn\n function _burnLoot(address from, uint256 loot) private {\n lootToken.burn(from, loot);\n }\n\n /// @notice Baal-or-governance-only function to change periods.\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\n function setGovernanceConfig(bytes memory _governanceConfig)\n external\n baalOrGovernorOnly\n {\n (\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ) = abi.decode(\n _governanceConfig,\n (uint32, uint32, uint256, uint256, uint256, uint256)\n );\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\n\n // on initialization of governance config, there is no shares token\n // skip this check on initialization of governance config.\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\n }\n\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\n proposalOffering = newOffering; /*set new proposal offering amount */\n quorumPercent = quorum;\n sponsorThreshold = sponsor;\n minRetentionPercent = minRetention;\n\n emit GovernanceConfigSet(\n voting,\n grace,\n newOffering,\n quorum,\n sponsor,\n minRetention\n );\n }\n\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\n /// @param _trustedForwarderAddress Trusted forwarder's address\n function setTrustedForwarder(address _trustedForwarderAddress)\n external\n baalOrGovernorOnly\n {\n _setTrustedForwarder(_trustedForwarderAddress);\n emit SetTrustedForwarder(_trustedForwarderAddress);\n }\n\n /***************\n GETTER FUNCTIONS\n ***************/\n /// @notice State helper to determine proposal state\n /// @param id Number of proposal in proposals\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n /// \\-> Cancelled \\-> Defeated\n function state(uint32 id) public view returns (ProposalState) {\n Proposal memory prop = proposals[id];\n if (prop.id == 0) {\n /*Uninitialized state*/\n return ProposalState.Unborn;\n } else if (\n prop.status[0] /* cancelled */\n ) {\n return ProposalState.Cancelled;\n } else if (\n prop.votingStarts == 0 /*Voting has not started*/\n ) {\n return ProposalState.Submitted;\n } else if (\n block.timestamp <= prop.votingEnds /*Voting in progress*/\n ) {\n return ProposalState.Voting;\n } else if (\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\n ) {\n return ProposalState.Grace;\n } else if (\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\n ) {\n return ProposalState.Defeated;\n } else if (\n prop.status[1] /* processed */\n ) {\n return ProposalState.Processed;\n }\n /* Proposal is ready to be processed*/\n else {\n return ProposalState.Ready;\n }\n }\n\n /// @notice Helper to get recorded proposal flags\n /// @param id Number of proposal in proposals\n /// @return [cancelled, processed, passed, actionFailed]\n function getProposalStatus(uint32 id)\n external\n view\n returns (bool[4] memory)\n {\n return proposals[id].status;\n }\n\n /// @notice Helper to check if shaman permission contains admin capabilities\n /// @param shaman Address attempting to execute admin permissioned functions\n function isAdmin(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 1 ||\n permission == 3 ||\n permission == 5 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains manager capabilities\n /// @param shaman Address attempting to execute manager permissioned functions\n function isManager(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 2 ||\n permission == 3 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains governor capabilities\n /// @param shaman Address attempting to execute governor permissioned functions\n function isGovernor(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 4 ||\n permission == 5 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check total supply of child loot contract\n function totalLoot() public view returns (uint256) {\n return lootToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of child shares contract\n function totalShares() public view returns (uint256) {\n return sharesToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of loot and shares\n function totalSupply() public view returns (uint256) {\n return totalLoot() + totalShares();\n }\n\n /***************\n HELPER FUNCTIONS\n ***************/\n /// @notice Returns the keccak256 hash of calldata\n function hashOperation(bytes memory _transactions)\n public\n pure\n virtual\n returns (bytes32 hash)\n {\n return keccak256(abi.encode(_transactions));\n }\n\n /// @notice Provides 'safe' {transfer} for ETH.\n function _safeTransferETH(address to, uint256 amount) internal {\n // transfer eth from target\n (bool success, ) = execAndReturnData(\n to,\n amount,\n \"\",\n Enum.Operation.Call\n );\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\n function _safeTransfer(\n address token,\n address to,\n uint256 amount\n ) private {\n (bool success, bytes memory data) = execAndReturnData(\n token,\n 0,\n abi.encodeWithSelector(0xa9059cbb, to, amount),\n Enum.Operation.Call\n ); /*'transfer(address,uint)'*/\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"transfer failed\"\n ); /*checks success & allows non-conforming transfers*/\n }\n\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (address sender) {\n sender = BaseRelayRecipient._msgSender();\n }\n\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (bytes calldata) {\n return BaseRelayRecipient._msgData();\n }\n}\n" + }, + "contracts/BaalSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\";\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"./Baal.sol\";\n\ncontract BaalSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\n // when some of the init addresses are updated\n uint256 public addrsVersion;\n\n address payable public template; // fixed template for baal using eip-1167 proxy pattern\n\n // Template contract to use for new Gnosis safe proxies\n address public gnosisSingleton;\n\n // Library to use for EIP1271 compatability\n address public gnosisFallbackLibrary;\n\n // Library to use for all safe transaction executions\n address public gnosisMultisendLibrary;\n\n // template contract to clone for loot ERC20 token\n address public lootSingleton;\n\n // template contract to clone for shares ERC20 token\n address public sharesSingleton;\n\n // Proxy summoners\n //\n GnosisSafeProxyFactory gnosisSafeProxyFactory;\n ModuleProxyFactory moduleProxyFactory;\n\n event SetAddrsVersion(\n uint256 version\n );\n\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n\n event DaoReferral(\n bytes32 referrer,\n address daoAddress\n );\n\n event DeployBaalTokens(\n address lootToken, \n address sharesToken\n );\n\n event DeployBaalSafe(\n address baalSafe,\n address moduleAddr\n );\n\n function initialize() initializer public {\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n // must be called after deploy to set libraries\n function setAddrs(\n address payable _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) public onlyOwner {\n require(_lootSingleton != address(0), \"!lootSingleton\");\n require(_sharesSingleton != address(0), \"!sharesSingleton\");\n require(_gnosisSingleton != address(0), \"!gnosisSingleton\");\n require(_gnosisFallbackLibrary != address(0), '!gnosisFallbackLibrary');\n require(_gnosisMultisendLibrary != address(0), '!gnosisMultisendLibrary');\n require(_gnosisSafeProxyFactory != address(0), '!gnosisSafeProxyFactory');\n require(_moduleProxyFactory != address(0), '!moduleProxyFactory');\n\n template = _template;\n gnosisSingleton = _gnosisSingleton;\n gnosisFallbackLibrary = _gnosisFallbackLibrary;\n gnosisMultisendLibrary = _gnosisMultisendLibrary;\n gnosisSafeProxyFactory = GnosisSafeProxyFactory(_gnosisSafeProxyFactory);\n moduleProxyFactory = ModuleProxyFactory(_moduleProxyFactory);\n lootSingleton = _lootSingleton;\n sharesSingleton = _sharesSingleton;\n\n emit SetAddrsVersion(\n addrsVersion++\n );\n \n }\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n public\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n function summonBaal(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce\n ) external returns (address) {\n \n return\n _summonBaal(\n initializationParams,\n initializationActions,\n _saltNonce\n );\n }\n\n // Add a referrer to help keep track of where deploies are coming from\n function summonBaalFromReferrer(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address) {\n address daoAddress;\n\n daoAddress = _summonBaal(\n initializationParams,\n initializationActions,\n _saltNonce\n );\n\n emit DaoReferral(referrer, daoAddress);\n return daoAddress;\n }\n\n // deploy new share and loot contracts\n function deployTokens(string memory _name, string memory _symbol) \n public \n returns (address lootToken, address sharesToken) \n {\n lootToken = address(new ERC1967Proxy(\n lootSingleton,\n abi.encodeWithSelector(\n IBaalToken(lootSingleton).setUp.selector, \n string(abi.encodePacked(_name, \" LOOT\")), \n string(abi.encodePacked(_symbol, \"-LOOT\")))\n ));\n\n sharesToken = address(new ERC1967Proxy(\n sharesSingleton,\n abi.encodeWithSelector(\n IBaalToken(sharesSingleton).setUp.selector, \n _name, \n _symbol)\n ));\n\n emit DeployBaalTokens(lootToken, sharesToken);\n\n }\n\n // deploy a safe with module and single module signer setup\n function deployAndSetupSafe(address _moduleAddr)\n public\n returns (address)\n {\n // Deploy new safe but do not set it up yet\n GnosisSafe _safe = GnosisSafe(\n payable(\n gnosisSafeProxyFactory.createProxy(\n gnosisSingleton,\n bytes(\"\")\n )\n )\n );\n // Generate delegate calls so the safe calls enableModule on itself during setup\n bytes memory _enableBaal = abi.encodeWithSignature(\n \"enableModule(address)\",\n address(_moduleAddr)\n );\n bytes memory _enableBaalMultisend = abi.encodePacked(\n uint8(0),\n address(_safe),\n uint256(0),\n uint256(_enableBaal.length),\n bytes(_enableBaal)\n );\n\n bytes memory _multisendAction = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n _enableBaalMultisend\n );\n\n // Workaround for solidity dynamic memory array\n address[] memory _owners = new address[](1);\n _owners[0] = address(_moduleAddr);\n\n // Call setup on safe to enable our new module and set the module as the only signer\n _safe.setup(\n _owners,\n 1,\n gnosisMultisendLibrary,\n _multisendAction,\n gnosisFallbackLibrary,\n address(0),\n 0,\n payable(address(0))\n );\n\n emit DeployBaalSafe(address(_safe), address(_moduleAddr));\n\n return address(_safe);\n }\n\n // advanced summon baal with different configurations\n // name and symbol can be blank if bringing own baal tokens\n // zero address for either loot or shares token will summon new ones\n // if bringing own tokens the ownership must be transfered to the new DAO\n // zero address for Safe with summon and setup a new Safe\n // if bringing existing safe the new dao must be enabled as a module\n // todo: add a simple summon that just creates a dao with a single summoner\n function _summonBaal(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce\n ) internal returns (address) {\n uint256 existingAddrs; // 1 tokens, 2 safe, 3 both\n (\n string memory _name, /*_name Name for erc20 `shares` accounting, empty if token */\n string memory _symbol, /*_symbol Symbol for erc20 `shares` accounting, empty if token*/\n address _safeAddr, /*address of safe, 0 addr if new*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771), 0 addr if initially disabled*/\n address _lootToken, /*predeployed loot token, 0 addr if new*/\n address _sharesToken /*predeployed shares token, 0 addr if new*/\n ) = abi.decode(initializationParams, (string, string, address, address, address, address));\n\n Baal _baal = Baal(\n moduleProxyFactory.deployModule(\n template, \n abi.encodeWithSignature(\"avatar()\"), \n _saltNonce\n )\n );\n\n // if loot or shares are zero address new tokens are deployed\n // tokens need to be baalTokens\n if(_lootToken == address(0) || _sharesToken == address(0)){\n (_lootToken, _sharesToken) = deployTokens(_name, _symbol);\n // pause tokens by default and transfer to the DAO\n IBaalToken(_lootToken).pause();\n IBaalToken(_sharesToken).pause();\n IBaalToken(_lootToken).transferOwnership(address(_baal));\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\n } else {\n existingAddrs += 1;\n }\n\n // if zero address deploy a new safe\n // Needs to be a valid zodiac treasury\n if(_safeAddr == address(0)){\n _safeAddr = deployAndSetupSafe(address(_baal));\n } else {\n existingAddrs += 2;\n }\n\n bytes memory _initializationMultisendData = encodeMultisend(\n initializationActions,\n address(_baal)\n );\n bytes memory _initializer = abi.encode(\n _lootToken,\n _sharesToken,\n gnosisMultisendLibrary,\n _safeAddr,\n _forwarder,\n _initializationMultisendData\n );\n // can run the actions now because we have a baal\n _baal.setUp(_initializer);\n\n emit SummonBaal(\n address(_baal),\n address(_baal.lootToken()),\n address(_baal.sharesToken()),\n _safeAddr,\n _forwarder,\n existingAddrs\n );\n\n return (address(_baal));\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n onlyOwner\n override\n {}\n}\n" + }, + "contracts/interfaces/IAdminShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IAdminShaman {\n function isAdmin(address shaman) external view returns (bool);\n\n // Admin Only\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n}\n" + }, + "contracts/interfaces/IBaal.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaal {\n function lootToken() external view returns (address);\n function sharesToken() external view returns (address);\n function votingPeriod() external view returns (uint32);\n function gracePeriod() external view returns (uint32);\n function proposalCount() external view returns (uint32);\n function proposalOffering() external view returns (uint256);\n function quorumPercent() external view returns (uint256);\n function sponsorThreshold() external view returns (uint256);\n function minRetentionPercent() external view returns (uint256);\n function latestSponsoredProposalId() external view returns (uint32);\n\n function setUp(bytes memory initializationParams) external;\n function multisendLibrary() external view returns (address);\n // Module\n function avatar() external view returns (address);\n function target() external view returns (address);\n function setAvatar(address avatar) external;\n function setTarget(address avatar) external;\n // BaseRelayRecipient\n function trustedForwarder() external view returns (address);\n function setTrustedForwarder(address trustedForwarderAddress) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n function totalLoot() external view returns (uint256);\n function totalShares() external view returns (uint256);\n function totalSupply() external view returns (uint256);\n function lootPaused() external view returns (bool);\n function sharesPaused() external view returns (bool);\n \n function shamans(address shaman) external view returns (uint256);\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\n function isAdmin(address shaman) external view returns (bool);\n function isManager(address shaman) external view returns (bool);\n function isGovernor(address shaman) external view returns (bool);\n function lockAdmin() external;\n function lockManager() external;\n function lockGovernor() external;\n function adminLock() external view returns (bool);\n function managerLock() external view returns (bool);\n function governorLock() external view returns (bool);\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n function setGovernanceConfig(bytes memory governanceConfig) external;\n\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable returns (uint256);\n function sponsorProposal(uint32 id) external;\n function processProposal(uint32 id, bytes calldata proposalData) external;\n function cancelProposal(uint32 id) external;\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\n function submitVote(uint32 id, bool approved) external;\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\n\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\n}\n" + }, + "contracts/interfaces/IBaalAndVaultSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalAndVaultSummoner {\n\n function _baalSummoner() external view returns (address);\n function summonBaalAndVault(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 saltNonce,\n bytes32 referrer,\n string memory name\n ) external returns (address _daoAddress, address _vaultAddress);\n}\n" + }, + "contracts/interfaces/IBaalSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalSummoner {\n event AdminChanged(address previousAdmin, address newAdmin);\n event BeaconUpgraded(address indexed beacon);\n event DaoReferral(bytes32 referrer, address daoAddress);\n event DeployBaalSafe(address baalSafe, address moduleAddr);\n event DeployBaalTokens(address lootToken, address sharesToken);\n event Initialized(uint8 version);\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event SetAddrsVersion(uint256 version);\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n event Upgraded(address indexed implementation);\n\n function setAddrs(\n address _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) external;\n\n function initialize() external;\n\n function transferOwnership(address newOwner) external;\n function upgradeTo(address newImplementation) external;\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\n function renounceOwnership() external;\n\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\n external\n returns (address);\n function summonBaalFromReferrer(\n bytes memory initializationParams,\n bytes[] memory initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address);\n\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\n function deployTokens(string memory _name, string memory _symbol)\n external\n returns (address lootToken, address sharesToken);\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend);\n function addrsVersion() external view returns (uint256);\n function gnosisFallbackLibrary() external view returns (address);\n function gnosisMultisendLibrary() external view returns (address);\n function gnosisSingleton() external view returns (address);\n function lootSingleton() external view returns (address);\n function sharesSingleton() external view returns (address);\n function owner() external view returns (address);\n function proxiableUUID() external view returns (bytes32);\n function template() external view returns (address);\n}\n" + }, + "contracts/interfaces/IBaalToken.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalToken {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function setUp(string memory _name, string memory _symbol) external;\n\n function mint(address recipient, uint256 amount) external;\n\n function burn(address account, uint256 amount) external;\n\n function pause() external;\n\n function unpause() external;\n\n function paused() external view returns (bool);\n \n function transferOwnership(address newOwner) external;\n\n function owner() external view returns (address);\n\n function balanceOf(address account) external view returns (uint256);\n\n function totalSupply() external view returns (uint256);\n\n function snapshot() external returns(uint256);\n\n function getCurrentSnapshotId() external returns(uint256);\n\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\n\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\n\n // below is shares token specific\n struct Checkpoint {\n uint32 fromTimePoint;\n uint256 votes;\n }\n\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\n\n function numCheckpoints(address) external view returns (uint256);\n\n function getCheckpoint(address, uint256)\n external\n view\n returns (Checkpoint memory);\n\n function getVotes(address account) external view returns (uint256);\n\n function delegates(address account) external view returns (address);\n\n function delegationNonces(address account) external view returns (uint256);\n\n function delegate(address delegatee) external;\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "contracts/interfaces/IGovernorShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IGovernorShaman {\n function isGovernor(address shaman) external view returns (bool);\n // Governor Only\n function setGovernanceConfig(bytes memory _governanceConfig) external;\n}\n" + }, + "contracts/interfaces/IManagerShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IManagerShaman {\n\n function isManager(address shaman) external view returns (bool);\n\n // Manager Only\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n\n}\n" + }, + "contracts/interfaces/IPoster.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IPoster {\n function post(string calldata content, string calldata tag) external;\n}\n" + }, + "contracts/utils/DelegationEIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4Delegation}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract DelegationEIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME_DELEGATION;\n bytes32 private _HASHED_VERSION_DELEGATION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained_delegation(name, version);\n }\n\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME_DELEGATION = hashedName;\n _HASHED_VERSION_DELEGATION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\n }\n\n function _buildDomainSeparatorDelegation(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_NAME_DELEGATION;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_VERSION_DELEGATION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/base/solcInputs/d833871936d16a85338aeeebf4887b62.json b/deployments/base/solcInputs/d833871936d16a85338aeeebf4887b62.json new file mode 100644 index 0000000..285fb33 --- /dev/null +++ b/deployments/base/solcInputs/d833871936d16a85338aeeebf4887b62.json @@ -0,0 +1,302 @@ +{ + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/base/Executor.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - \ncontract Executor {\n function execute(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 txGas\n ) internal returns (bool success) {\n if (operation == Enum.Operation.DelegateCall) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n } else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract FallbackManager is SelfAuthorized {\n event ChangedFallbackHandler(address handler);\n\n // keccak256(\"fallback_manager.handler.address\")\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\n\n function internalSetFallbackHandler(address handler) internal {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, handler)\n }\n }\n\n /// @dev Allows to add a contract to handle fallback calls.\n /// Only fallback calls without value and with data will be forwarded.\n /// This can only be done via a Safe transaction.\n /// @param handler contract to handle fallbacks calls.\n function setFallbackHandler(address handler) public authorized {\n internalSetFallbackHandler(handler);\n emit ChangedFallbackHandler(handler);\n }\n\n // solhint-disable-next-line payable-fallback,no-complex-fallback\n fallback() external {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let handler := sload(slot)\n if iszero(handler) {\n return(0, 0)\n }\n calldatacopy(0, 0, calldatasize())\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n mstore(calldatasize(), shl(96, caller()))\n // Add 20 bytes for the address appended add the end\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if iszero(success) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\n\ninterface Guard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract GuardManager is SelfAuthorized {\n event ChangedGuard(address guard);\n // keccak256(\"guard_manager.guard.address\")\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address guard) external authorized {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, guard)\n }\n emit ChangedGuard(guard);\n }\n\n function getGuard() internal view returns (address guard) {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n guard := sload(slot)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\nimport \"./Executor.sol\";\n\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract ModuleManager is SelfAuthorized, Executor {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n address internal constant SENTINEL_MODULES = address(0x1);\n\n mapping(address => address) internal modules;\n\n function setupModules(address to, bytes memory data) internal {\n require(modules[SENTINEL_MODULES] == address(0), \"GS100\");\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n if (to != address(0))\n // Setup has to complete successfully or transaction fails.\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \"GS000\");\n }\n\n /// @dev Allows to add a module to the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Enables the module `module` for the Safe.\n /// @param module Module to be whitelisted.\n function enableModule(address module) public authorized {\n // Module address cannot be null or sentinel.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n // Module cannot be added twice.\n require(modules[module] == address(0), \"GS102\");\n modules[module] = modules[SENTINEL_MODULES];\n modules[SENTINEL_MODULES] = module;\n emit EnabledModule(module);\n }\n\n /// @dev Allows to remove a module from the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Disables the module `module` for the Safe.\n /// @param prevModule Module that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) public authorized {\n // Validate module address and check that it corresponds to module index.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n require(modules[prevModule] == module, \"GS103\");\n modules[prevModule] = modules[module];\n modules[module] = address(0);\n emit DisabledModule(module);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public virtual returns (bool success) {\n // Only whitelisted modules are allowed.\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \"GS104\");\n // Execute transaction without further confirmations.\n success = execute(to, value, data, operation, gasleft());\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) public view returns (bool) {\n return SENTINEL_MODULES != module && modules[module] != address(0);\n }\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 moduleCount = 0;\n address currentModule = modules[start];\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\n array[moduleCount] = currentModule;\n currentModule = modules[currentModule];\n moduleCount++;\n }\n next = currentModule;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, moduleCount)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract OwnerManager is SelfAuthorized {\n event AddedOwner(address owner);\n event RemovedOwner(address owner);\n event ChangedThreshold(uint256 threshold);\n\n address internal constant SENTINEL_OWNERS = address(0x1);\n\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\n // Threshold can only be 0 at initialization.\n // Check ensures that setup function can only be called once.\n require(threshold == 0, \"GS200\");\n // Validate that threshold is smaller than number of added owners.\n require(_threshold <= _owners.length, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n // Initializing Safe owners.\n address currentOwner = SENTINEL_OWNERS;\n for (uint256 i = 0; i < _owners.length; i++) {\n // Owner address cannot be null.\n address owner = _owners[i];\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[currentOwner] = owner;\n currentOwner = owner;\n }\n owners[currentOwner] = SENTINEL_OWNERS;\n ownerCount = _owners.length;\n threshold = _threshold;\n }\n\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\n /// @param owner New owner address.\n /// @param _threshold New threshold.\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[owner] = owners[SENTINEL_OWNERS];\n owners[SENTINEL_OWNERS] = owner;\n ownerCount++;\n emit AddedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\n /// @param owner Owner address to be removed.\n /// @param _threshold New threshold.\n function removeOwner(\n address prevOwner,\n address owner,\n uint256 _threshold\n ) public authorized {\n // Only allow to remove an owner, if threshold can still be reached.\n require(ownerCount - 1 >= _threshold, \"GS201\");\n // Validate owner address and check that it corresponds to owner index.\n require(owner != address(0) && owner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == owner, \"GS205\");\n owners[prevOwner] = owners[owner];\n owners[owner] = address(0);\n ownerCount--;\n emit RemovedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to swap/replace an owner from the Safe with another address.\n /// This can only be done via a Safe transaction.\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n function swapOwner(\n address prevOwner,\n address oldOwner,\n address newOwner\n ) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[newOwner] == address(0), \"GS204\");\n // Validate oldOwner address and check that it corresponds to owner index.\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == oldOwner, \"GS205\");\n owners[newOwner] = owners[oldOwner];\n owners[prevOwner] = newOwner;\n owners[oldOwner] = address(0);\n emit RemovedOwner(oldOwner);\n emit AddedOwner(newOwner);\n }\n\n /// @dev Allows to update the number of required confirmations by Safe owners.\n /// This can only be done via a Safe transaction.\n /// @notice Changes the threshold of the Safe to `_threshold`.\n /// @param _threshold New threshold.\n function changeThreshold(uint256 _threshold) public authorized {\n // Validate that threshold is smaller than number of owners.\n require(_threshold <= ownerCount, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n threshold = _threshold;\n emit ChangedThreshold(threshold);\n }\n\n function getThreshold() public view returns (uint256) {\n return threshold;\n }\n\n function isOwner(address owner) public view returns (bool) {\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\n }\n\n /// @dev Returns array of owners.\n /// @return Array of Safe owners.\n function getOwners() public view returns (address[] memory) {\n address[] memory array = new address[](ownerCount);\n\n // populate return array\n uint256 index = 0;\n address currentOwner = owners[SENTINEL_OWNERS];\n while (currentOwner != SENTINEL_OWNERS) {\n array[index] = currentOwner;\n currentOwner = owners[currentOwner];\n index++;\n }\n return array;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\n/// @author Richard Meissner - \ncontract EtherPaymentFallback {\n event SafeReceived(address indexed sender, uint256 value);\n\n /// @dev Fallback function accepts Ether transactions.\n receive() external payable {\n emit SafeReceived(msg.sender, msg.value);\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SecuredTokenTransfer - Secure token transfer\n/// @author Richard Meissner - \ncontract SecuredTokenTransfer {\n /// @dev Transfers a token and returns if it was a success\n /// @param token Token that should be transferred\n /// @param receiver Receiver to whom the token should be transferred\n /// @param amount The amount of tokens that should be transferred\n function transferToken(\n address token,\n address receiver,\n uint256 amount\n ) internal returns (bool transferred) {\n // 0xa9059cbb - keccack(\"transfer(address,uint256)\")\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // We write the return value to scratch space.\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n switch returndatasize()\n case 0 {\n transferred := success\n }\n case 0x20 {\n transferred := iszero(or(iszero(success), iszero(mload(0))))\n }\n default {\n transferred := 0\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - \ncontract SelfAuthorized {\n function requireSelfCall() private view {\n require(msg.sender == address(this), \"GS031\");\n }\n\n modifier authorized() {\n // This is a function call as it minimized the bytecode size\n requireSelfCall();\n _;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\n/// @author Richard Meissner - \ncontract SignatureDecoder {\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Singleton.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\n/// @author Richard Meissner - \ncontract Singleton {\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\n // It should also always be ensured that the address is stored alone (uses a full word)\n address private singleton;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\ncontract StorageAccessible {\n /**\n * @dev Reads `length` bytes of storage in the currents contract\n * @param offset - the offset in the current contract's storage in words to start reading from\n * @param length - the number of words (32 bytes) of data to read\n * @return the bytes that were read.\n */\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\n bytes memory result = new bytes(length * 32);\n for (uint256 index = 0; index < length; index++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let word := sload(add(offset, index))\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n }\n }\n return result;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static).\n *\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\n * Specifically, the `returndata` after a call to this method will be:\n * `success:bool || response.length:uint256 || response:bytes`.\n *\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\n\n mstore(0x00, success)\n mstore(0x20, returndatasize())\n returndatacopy(0x40, 0, returndatasize())\n revert(0, add(returndatasize(), 0x40))\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/GnosisSafeStorage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title GnosisSafeStorage - Storage layout of the Safe contracts to be used in libraries\n/// @author Richard Meissner - \ncontract GnosisSafeStorage {\n // From /common/Singleton.sol\n address internal singleton;\n // From /common/ModuleManager.sol\n mapping(address => address) internal modules;\n // From /common/OwnerManager.sol\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n // From /GnosisSafe.sol\n bytes32 internal nonce;\n bytes32 internal domainSeparator;\n mapping(bytes32 => uint256) internal signedMessages;\n mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeStorage.sol\";\nimport \"../../GnosisSafe.sol\";\n\n/// @title SignMessageLib - Allows to set an entry in the signedMessages\n/// @author Richard Meissner - \ncontract SignMessageLib is GnosisSafeStorage {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n event SignMsg(bytes32 indexed msgHash);\n\n /// @dev Marks a message as signed, so that it can be used with EIP-1271\n /// @notice Marks a message (`_data`) as signed.\n /// @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)\n function signMessage(bytes calldata _data) external {\n bytes32 msgHash = getMessageHash(_data);\n signedMessages[msgHash] = 1;\n emit SignMsg(msgHash);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return\n keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), GnosisSafe(payable(address(this))).domainSeparator(), safeMessageHash));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title GnosisSafeMath\n * @dev Math operations with safety checks that revert on error\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\n * TODO: remove once open zeppelin update to solc 0.5.0\n */\nlibrary GnosisSafeMath {\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./base/ModuleManager.sol\";\nimport \"./base/OwnerManager.sol\";\nimport \"./base/FallbackManager.sol\";\nimport \"./base/GuardManager.sol\";\nimport \"./common/EtherPaymentFallback.sol\";\nimport \"./common/Singleton.sol\";\nimport \"./common/SignatureDecoder.sol\";\nimport \"./common/SecuredTokenTransfer.sol\";\nimport \"./common/StorageAccessible.sol\";\nimport \"./interfaces/ISignatureValidator.sol\";\nimport \"./external/GnosisSafeMath.sol\";\n\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafe is\n EtherPaymentFallback,\n Singleton,\n ModuleManager,\n OwnerManager,\n SignatureDecoder,\n SecuredTokenTransfer,\n ISignatureValidatorConstants,\n FallbackManager,\n StorageAccessible,\n GuardManager\n{\n using GnosisSafeMath for uint256;\n\n string public constant VERSION = \"1.3.0\";\n\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n // keccak256(\n // \"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\"\n // );\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\n\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\n event SignMsg(bytes32 indexed msgHash);\n event ExecutionFailure(bytes32 txHash, uint256 payment);\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\n\n uint256 public nonce;\n bytes32 private _deprecatedDomainSeparator;\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\n mapping(bytes32 => uint256) public signedMessages;\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\n\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\n constructor() {\n // By setting the threshold it is not possible to call setup anymore,\n // so we create a Safe with 0 owners and threshold 1.\n // This is an unusable Safe, perfect for the singleton\n threshold = 1;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n /// @param to Contract address for optional delegate call.\n /// @param data Data payload for optional delegate call.\n /// @param fallbackHandler Handler for fallback calls to this contract\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\n function setup(\n address[] calldata _owners,\n uint256 _threshold,\n address to,\n bytes calldata data,\n address fallbackHandler,\n address paymentToken,\n uint256 payment,\n address payable paymentReceiver\n ) external {\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\n setupOwners(_owners, _threshold);\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\n setupModules(to, data);\n\n if (payment > 0) {\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\n }\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\n }\n\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\n /// Note: The fees are always transferred, even if the user transaction fails.\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @param safeTxGas Gas that should be used for the Safe transaction.\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Gas price that should be used for the payment calculation.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\n function execTransaction(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures\n ) public payable virtual returns (bool success) {\n bytes32 txHash;\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n bytes memory txHashData =\n encodeTransactionData(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n nonce\n );\n // Increase nonce and execute transaction.\n nonce++;\n txHash = keccak256(txHashData);\n checkSignatures(txHash, txHashData, signatures);\n }\n address guard = getGuard();\n {\n if (guard != address(0)) {\n Guard(guard).checkTransaction(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n signatures,\n msg.sender\n );\n }\n }\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \"GS010\");\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n uint256 gasUsed = gasleft();\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\n gasUsed = gasUsed.sub(gasleft());\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\n require(success || safeTxGas != 0 || gasPrice != 0, \"GS013\");\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\n uint256 payment = 0;\n if (gasPrice > 0) {\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\n }\n if (success) emit ExecutionSuccess(txHash, payment);\n else emit ExecutionFailure(txHash, payment);\n }\n {\n if (guard != address(0)) {\n Guard(guard).checkAfterExecution(txHash, success);\n }\n }\n }\n\n function handlePayment(\n uint256 gasUsed,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver\n ) private returns (uint256 payment) {\n // solhint-disable-next-line avoid-tx-origin\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\n if (gasToken == address(0)) {\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\n require(receiver.send(payment), \"GS011\");\n } else {\n payment = gasUsed.add(baseGas).mul(gasPrice);\n require(transferToken(gasToken, receiver, payment), \"GS012\");\n }\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n */\n function checkSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures\n ) public view {\n // Load threshold to avoid multiple storage loads\n uint256 _threshold = threshold;\n // Check that a threshold is set\n require(_threshold > 0, \"GS001\");\n checkNSignatures(dataHash, data, signatures, _threshold);\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n * @param requiredSignatures Amount of required valid signatures.\n */\n function checkNSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures,\n uint256 requiredSignatures\n ) public view {\n // Check that the provided signature data is not too short\n require(signatures.length >= requiredSignatures.mul(65), \"GS020\");\n // There cannot be an owner with address 0.\n address lastOwner = address(0);\n address currentOwner;\n uint8 v;\n bytes32 r;\n bytes32 s;\n uint256 i;\n for (i = 0; i < requiredSignatures; i++) {\n (v, r, s) = signatureSplit(signatures, i);\n if (v == 0) {\n // If v is 0 then it is a contract signature\n // When handling contract signatures the address of the contract is encoded into r\n currentOwner = address(uint160(uint256(r)));\n\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\n // Here we only check that the pointer is not pointing inside the part that is being processed\n require(uint256(s) >= requiredSignatures.mul(65), \"GS021\");\n\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\n require(uint256(s).add(32) <= signatures.length, \"GS022\");\n\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\n uint256 contractSignatureLen;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\n }\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \"GS023\");\n\n // Check signature\n bytes memory contractSignature;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\n contractSignature := add(add(signatures, s), 0x20)\n }\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \"GS024\");\n } else if (v == 1) {\n // If v is 1 then it is an approved hash\n // When handling approved hashes the address of the approver is encoded into r\n currentOwner = address(uint160(uint256(r)));\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \"GS025\");\n } else if (v > 30) {\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\n currentOwner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", dataHash)), v - 4, r, s);\n } else {\n // Default is the ecrecover flow with the provided data hash\n // Use ecrecover with the messageHash for EOA signatures\n currentOwner = ecrecover(dataHash, v, r, s);\n }\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \"GS026\");\n lastOwner = currentOwner;\n }\n }\n\n /// @dev Allows to estimate a Safe transaction.\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\n function requiredTxGas(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation\n ) external returns (uint256) {\n uint256 startGas = gasleft();\n // We don't provide an error message here, as we use it to return the estimate\n require(execute(to, value, data, operation, gasleft()));\n uint256 requiredGas = startGas - gasleft();\n // Convert response to string and return via error message\n revert(string(abi.encodePacked(requiredGas)));\n }\n\n /**\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\n */\n function approveHash(bytes32 hashToApprove) external {\n require(owners[msg.sender] != address(0), \"GS030\");\n approvedHashes[msg.sender][hashToApprove] = 1;\n emit ApproveHash(hashToApprove, msg.sender);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n function domainSeparator() public view returns (bytes32) {\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\n }\n\n /// @dev Returns the bytes that are hashed to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Gas that should be used for the safe transaction.\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash bytes.\n function encodeTransactionData(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes memory) {\n bytes32 safeTxHash =\n keccak256(\n abi.encode(\n SAFE_TX_TYPEHASH,\n to,\n value,\n keccak256(data),\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n _nonce\n )\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\n }\n\n /// @dev Returns hash to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Fas that should be used for the safe transaction.\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash.\n function getTransactionHash(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes32) {\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./DefaultCallbackHandler.sol\";\nimport \"../interfaces/ISignatureValidator.sol\";\nimport \"../GnosisSafe.sol\";\n\n/// @title Compatibility Fallback Handler - fallback handler to provider compatibility between pre 1.3.0 and 1.3.0+ Safe contracts\n/// @author Richard Meissner - \ncontract CompatibilityFallbackHandler is DefaultCallbackHandler, ISignatureValidator {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256(\"simulate(address,bytes)\"));\n\n address internal constant SENTINEL_MODULES = address(0x1);\n bytes4 internal constant UPDATED_MAGIC_VALUE = 0x1626ba7e;\n\n /**\n * Implementation of ISignatureValidator (see `interfaces/ISignatureValidator.sol`)\n * @dev Should return whether the signature provided is valid for the provided data.\n * @param _data Arbitrary length data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _data\n * @return a bool upon valid or invalid signature with corresponding _data\n */\n function isValidSignature(bytes calldata _data, bytes calldata _signature) public view override returns (bytes4) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n bytes32 messageHash = getMessageHashForSafe(safe, _data);\n if (_signature.length == 0) {\n require(safe.signedMessages(messageHash) != 0, \"Hash not approved\");\n } else {\n safe.checkSignatures(messageHash, _data, _signature);\n }\n return EIP1271_MAGIC_VALUE;\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n return getMessageHashForSafe(GnosisSafe(payable(msg.sender)), message);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param safe Safe to which the message is targeted\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHashForSafe(GnosisSafe safe, bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), safe.domainSeparator(), safeMessageHash));\n }\n\n /**\n * Implementation of updated EIP-1271\n * @dev Should return whether the signature provided is valid for the provided data.\n * The save does not implement the interface since `checkSignatures` is not a view method.\n * The method will not perform any state changes (see parameters of `checkSignatures`)\n * @param _dataHash Hash of the data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _dataHash\n * @return a bool upon valid or invalid signature with corresponding _dataHash\n * @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\n */\n function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view returns (bytes4) {\n ISignatureValidator validator = ISignatureValidator(msg.sender);\n bytes4 value = validator.isValidSignature(abi.encode(_dataHash), _signature);\n return (value == EIP1271_MAGIC_VALUE) ? UPDATED_MAGIC_VALUE : bytes4(0);\n }\n\n /// @dev Returns array of first 10 modules.\n /// @return Array of modules.\n function getModules() external view returns (address[] memory) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n (address[] memory array, ) = safe.getModulesPaginated(SENTINEL_MODULES, 10);\n return array;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulate(address targetContract, bytes calldata calldataPayload) external returns (bytes memory response) {\n // Suppress compiler warnings about not using parameters, while allowing\n // parameters to keep names for documentation purposes. This does not\n // generate code.\n targetContract;\n calldataPayload;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let internalCalldata := mload(0x40)\n // Store `simulateAndRevert.selector`.\n // String representation is used to force right padding\n mstore(internalCalldata, \"\\xb4\\xfa\\xba\\x09\")\n // Abuse the fact that both this and the internal methods have the\n // same signature, and differ only in symbol name (and therefore,\n // selector) and copy calldata directly. This saves us approximately\n // 250 bytes of code and 300 gas at runtime over the\n // `abi.encodeWithSelector` builtin.\n calldatacopy(add(internalCalldata, 0x04), 0x04, sub(calldatasize(), 0x04))\n\n // `pop` is required here by the compiler, as top level expressions\n // can't have return values in inline assembly. `call` typically\n // returns a 0 or 1 value indicated whether or not it reverted, but\n // since we know it will always revert, we can safely ignore it.\n pop(\n call(\n gas(),\n // address() has been changed to caller() to use the implementation of the Safe\n caller(),\n 0,\n internalCalldata,\n calldatasize(),\n // The `simulateAndRevert` call always reverts, and\n // instead encodes whether or not it was successful in the return\n // data. The first 32-byte word of the return data contains the\n // `success` value, so write it to memory address 0x00 (which is\n // reserved Solidity scratch space and OK to use).\n 0x00,\n 0x20\n )\n )\n\n // Allocate and copy the response bytes, making sure to increment\n // the free memory pointer accordingly (in case this method is\n // called as an internal function). The remaining `returndata[0x20:]`\n // contains the ABI encoded response bytes, so we can just write it\n // as is to memory.\n let responseSize := sub(returndatasize(), 0x20)\n response := mload(0x40)\n mstore(0x40, add(response, responseSize))\n returndatacopy(response, 0x20, responseSize)\n\n if iszero(mload(0x00)) {\n revert(add(response, 0x20), mload(response))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/DefaultCallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/ERC1155TokenReceiver.sol\";\nimport \"../interfaces/ERC721TokenReceiver.sol\";\nimport \"../interfaces/ERC777TokensRecipient.sol\";\nimport \"../interfaces/IERC165.sol\";\n\n/// @title Default Callback Handler - returns true for known token callbacks\n/// @author Richard Meissner - \ncontract DefaultCallbackHandler is ERC1155TokenReceiver, ERC777TokensRecipient, ERC721TokenReceiver, IERC165 {\n string public constant NAME = \"Default Callback Handler\";\n string public constant VERSION = \"1.0.0\";\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xbc197c81;\n }\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0x150b7a02;\n }\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n ) external pure override {\n // We implement this for completeness, doesn't really have any value\n }\n\n function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {\n return\n interfaceId == type(ERC1155TokenReceiver).interfaceId ||\n interfaceId == type(ERC721TokenReceiver).interfaceId ||\n interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC1155TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\n*/\ninterface ERC1155TokenReceiver {\n /**\n @notice Handle the receipt of a single ERC1155 token type.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\n This function MUST revert if it rejects the transfer.\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _id The ID of the token being transferred\n @param _value The amount of tokens being transferred\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 _id,\n uint256 _value,\n bytes calldata _data\n ) external returns (bytes4);\n\n /**\n @notice Handle the receipt of multiple ERC1155 token types.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\n This function MUST revert if it rejects the transfer(s).\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata _ids,\n uint256[] calldata _values,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC777TokensRecipient.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface ERC777TokensRecipient {\n function tokensReceived(\n address operator,\n address from,\n address to,\n uint256 amount,\n bytes calldata data,\n bytes calldata operatorData\n ) external;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @notice More details at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ncontract ISignatureValidatorConstants {\n // bytes4(keccak256(\"isValidSignature(bytes,bytes)\")\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\n}\n\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n *\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - \n/// @author Gonçalo Sá - \n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract MultiSend {\n address private immutable multisendSingleton;\n\n constructor() {\n multisendSingleton = address(this);\n }\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions. Each transaction is encoded as a packed bytes of\n /// operation as a uint8 with 0 for a call or 1 for a delegatecall (=> 1 byte),\n /// to as a address (=> 20 bytes),\n /// value as a uint256 (=> 32 bytes),\n /// data length as a uint256 (=> 32 bytes),\n /// data as bytes.\n /// see abi.encodePacked for more information on packed encoding\n /// @notice This method is payable as delegatecalls keep the msg.value from the previous call\n /// If the calling method (e.g. execTransaction) received ETH this would revert otherwise\n function multiSend(bytes memory transactions) public payable {\n require(address(this) != multisendSingleton, \"MultiSend should only be called via delegatecall\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let length := mload(transactions)\n let i := 0x20\n for {\n // Pre block is not used in \"while mode\"\n } lt(i, length) {\n // Post block is not used in \"while mode\"\n } {\n // First byte of the data is the operation.\n // We shift by 248 bits (256 - 8 [operation byte]) it right since mload will always load 32 bytes (a word).\n // This will also zero out unused data.\n let operation := shr(0xf8, mload(add(transactions, i)))\n // We offset the load address by 1 byte (operation byte)\n // We shift it right by 96 bits (256 - 160 [20 address bytes]) to right-align the data and zero out unused data.\n let to := shr(0x60, mload(add(transactions, add(i, 0x01))))\n // We offset the load address by 21 byte (operation byte + 20 address bytes)\n let value := mload(add(transactions, add(i, 0x15)))\n // We offset the load address by 53 byte (operation byte + 20 address bytes + 32 value bytes)\n let dataLength := mload(add(transactions, add(i, 0x35)))\n // We offset the load address by 85 byte (operation byte + 20 address bytes + 32 value bytes + 32 data length bytes)\n let data := add(transactions, add(i, 0x55))\n let success := 0\n switch operation\n case 0 {\n success := call(gas(), to, value, data, dataLength, 0, 0)\n }\n case 1 {\n success := delegatecall(gas(), to, data, dataLength, 0, 0)\n }\n if eq(success, 0) {\n revert(0, 0)\n }\n // Next entry starts at 85 byte + data length\n i := add(i, add(0x55, dataLength))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\n/// @author Richard Meissner - \ninterface IProxy {\n function masterCopy() external view returns (address);\n}\n\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafeProxy {\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\n address internal singleton;\n\n /// @dev Constructor function sets address of singleton contract.\n /// @param _singleton Singleton address.\n constructor(address _singleton) {\n require(_singleton != address(0), \"Invalid singleton address provided\");\n singleton = _singleton;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n fallback() external payable {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n // 0xa619486e == keccak(\"masterCopy()\"). The value is right padded to 32-bytes with 0s\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\n mstore(0, _singleton)\n return(0, 0x20)\n }\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeProxy.sol\";\nimport \"./IProxyCreationCallback.sol\";\n\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n/// @author Stefan George - \ncontract GnosisSafeProxyFactory {\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param singleton Address of singleton contract.\n /// @param data Payload for message call sent to new proxy contract.\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\n proxy = new GnosisSafeProxy(singleton);\n if (data.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, singleton);\n }\n\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\n function proxyRuntimeCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).runtimeCode;\n }\n\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\n function proxyCreationCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).creationCode;\n }\n\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\n /// This method is only meant as an utility to be called from other methods\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function deployProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) internal returns (GnosisSafeProxy proxy) {\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\n // solhint-disable-next-line no-inline-assembly\n assembly {\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\n }\n require(address(proxy) != address(0), \"Create2 call failed\");\n }\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function createProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n if (initializer.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, _singleton);\n }\n\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\n function createProxyWithCallback(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce,\n IProxyCreationCallback callback\n ) public returns (GnosisSafeProxy proxy) {\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\n }\n\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function calculateCreateProxyWithNonceAddress(\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n revert(string(abi.encodePacked(proxy)));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"./GnosisSafeProxy.sol\";\n\ninterface IProxyCreationCallback {\n function proxyCreated(\n GnosisSafeProxy proxy,\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n (success, ) = _exec(to, value, data, operation);\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n (success, returnData) = _exec(to, value, data, operation);\n }\n\n function _exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) private returns (bool success, bytes memory returnData) {\n address currentGuard = guard;\n if (currentGuard != address(0)) {\n IGuard(currentGuard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n \"\",\n msg.sender\n );\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n IGuard(currentGuard).checkAfterExecution(\"\", success);\n } else {\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n }\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract ModuleProxyFactory {\n event ModuleProxyCreation(\n address indexed proxy,\n address indexed masterCopy\n );\n\n /// `target` can not be zero.\n error ZeroAddress(address target);\n\n /// `target` has no code deployed.\n error TargetHasNoCode(address target);\n\n /// `address_` is already taken.\n error TakenAddress(address address_);\n\n /// @notice Initialization failed.\n error FailedInitialization();\n\n function createProxy(address target, bytes32 salt)\n internal\n returns (address result)\n {\n if (address(target) == address(0)) revert ZeroAddress(target);\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\n bytes memory deployment = abi.encodePacked(\n hex\"602d8060093d393df3363d3d373d3d3d363d73\",\n target,\n hex\"5af43d82803e903d91602b57fd5bf3\"\n );\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\n }\n if (result == address(0)) revert TakenAddress(result);\n }\n\n function deployModule(\n address masterCopy,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (address proxy) {\n proxy = createProxy(\n masterCopy,\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\n );\n (bool success, ) = proxy.call(initializer);\n if (!success) revert FailedInitialization();\n\n emit ModuleProxyCreation(proxy, masterCopy);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@opengsn/contracts/src/BaseRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable no-inline-assembly\npragma solidity >=0.6.9;\n\nimport \"./interfaces/IRelayRecipient.sol\";\n\n/**\n * A base contract to be inherited by any contract that want to receive relayed transactions\n * A subclass must use \"_msgSender()\" instead of \"msg.sender\"\n */\nabstract contract BaseRelayRecipient is IRelayRecipient {\n\n /*\n * Forwarder singleton we accept calls from\n */\n address private _trustedForwarder;\n\n function trustedForwarder() public virtual view returns (address){\n return _trustedForwarder;\n }\n\n function _setTrustedForwarder(address _forwarder) internal {\n _trustedForwarder = _forwarder;\n }\n\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\n return forwarder == _trustedForwarder;\n }\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, return the original sender.\n * otherwise, return `msg.sender`.\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal override virtual view returns (address ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n // At this point we know that the sender is a trusted forwarder,\n // so we trust that the last bytes of msg.data are the verified sender address.\n // extract sender address from the end of msg.data\n assembly {\n ret := shr(96,calldataload(sub(calldatasize(),20)))\n }\n } else {\n ret = msg.sender;\n }\n }\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal override virtual view returns (bytes calldata ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n return msg.data[0:msg.data.length-20];\n } else {\n return msg.data;\n }\n }\n}\n" + }, + "@opengsn/contracts/src/interfaces/IRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\n/**\n * a contract must implement this interface in order to support relayed transaction.\n * It is better to inherit the BaseRelayRecipient as its implementation.\n */\nabstract contract IRelayRecipient {\n\n /**\n * return if the forwarder is trusted to forward relayed transactions to us.\n * the forwarder is required to verify the sender's signature, and verify\n * the call is not a replay.\n */\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\n * of the msg.data.\n * otherwise, return `msg.sender`\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal virtual view returns (address);\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal virtual view returns (bytes calldata);\n\n function versionRecipient() external virtual view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private constant _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n /**\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n * However, to ensure consistency with the upgradeable transpiler, we will continue\n * to reserve a slot.\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\n */\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\n __EIP712_init_unchained(name, \"1\");\n }\n\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n function __ERC20Snapshot_init() internal onlyInitializing {\n }\n\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n }\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using ArraysUpgradeable for uint256[];\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n CountersUpgradeable.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./StorageSlotUpgradeable.sol\";\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n using StorageSlotUpgradeable for bytes32;\n\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (unsafeAccess(array, mid).value > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getAddressSlot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getBytes32Slot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getUint256Slot();\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\n\nimport \"./EIP712Upgradeable.sol\";\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlotUpgradeable {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/Clones.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address implementation, bytes32 salt)\n internal\n view\n returns (address predicted)\n {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "contracts/Baal.sol": { + "content": "// SPDX-License-Identifier: MIT\n/*\n███ ██ ██ █\n█ █ █ █ █ █ █\n█ ▀ ▄ █▄▄█ █▄▄█ █\n█ ▄▀ █ █ █ █ ███▄\n███ █ █ ▀\n █ █\n ▀ ▀*/\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\";\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@opengsn/contracts/src/BaseRelayRecipient.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\nimport \"./interfaces/IBaalToken.sol\";\n\n/// @title Baal ';_;'.\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\n using ECDSAUpgradeable for bytes32;\n\n // ERC20 SHARES + LOOT\n\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\n\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\n\n // GOVERNANCE PARAMS\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\n uint256 public proposalOffering; /* non-member proposal offering*/\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\n\n // SHAMAN PERMISSIONS\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\n /* permissions registry for shamans\n 0 = no permission\n 1 = admin only\n 2 = manager only\n 4 = governance only\n 3 = admin + manager\n 5 = admin + governance\n 6 = manager + governance\n 7 = admin + manager + governance */\n\n // PROPOSAL TRACKING\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\n\n // MISCELLANEOUS PARAMS\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\n address public multisendLibrary; /*address of multisend library*/\n string public override versionRecipient; /* version recipient for OpenGSN */\n\n // SIGNATURE HELPERS\n bytes32 constant VOTE_TYPEHASH = keccak256(\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\");\n\n // DATA STRUCTURES\n struct Proposal {\n /*Baal proposal details*/\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\n uint256 baalGas; /* gas needed to process proposal */\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\n }\n\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n \\-> Cancelled \\-> Defeated */\n enum ProposalState {\n Unborn, /* 0 - can submit */\n Submitted, /* 1 - can sponsor -> voting */\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\n Cancelled, /* 3 - terminal state, counts as processed */\n Grace, /* 4 - proceeds to ready/defeated */\n Ready, /* 5 - can be processed */\n Processed, /* 6 - terminal state */\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\n }\n\n // MODIFIERS\n\n modifier baalOnly() {\n require(_msgSender() == avatar, \"!baal\");\n _;\n }\n\n modifier baalOrAdminOnly() {\n require(_msgSender() == avatar || isAdmin(_msgSender()), \"!baal & !admin\"); /*check `shaman` is admin*/\n _;\n }\n\n modifier baalOrManagerOnly() {\n require(\n _msgSender() == avatar || isManager(_msgSender()),\n \"!baal & !manager\"\n ); /*check `shaman` is manager*/\n _;\n }\n\n modifier baalOrGovernorOnly() {\n require(\n _msgSender() == avatar || isGovernor(_msgSender()),\n \"!baal & !governor\"\n ); /*check `shaman` is governor*/\n _;\n }\n\n // EVENTS\n event SetupComplete(\n bool lootPaused,\n bool sharesPaused,\n uint32 gracePeriod,\n uint32 votingPeriod,\n uint256 proposalOffering,\n uint256 quorumPercent,\n uint256 sponsorThreshold,\n uint256 minRetentionPercent,\n string name,\n string symbol,\n uint256 totalShares,\n uint256 totalLoot\n ); /*emits after Baal summoning*/\n event SubmitProposal(\n uint256 indexed proposal,\n bytes32 indexed proposalDataHash,\n uint256 votingPeriod,\n bytes proposalData,\n uint256 expiration,\n uint256 baalGas,\n bool selfSponsor,\n uint256 timestamp,\n string details\n ); /*emits after proposal is submitted*/\n event SponsorProposal(\n address indexed member,\n uint256 indexed proposal,\n uint256 indexed votingStarts\n ); /*emits after member has sponsored proposal*/\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\n event SubmitVote(\n address indexed member,\n uint256 balance,\n uint256 indexed proposal,\n bool indexed approved\n ); /*emits after vote is submitted on proposal*/\n event ProcessProposal(\n uint256 indexed proposal,\n bool passed,\n bool actionFailed\n ); /*emits when proposal is processed & executed*/\n event Ragequit(\n address indexed member,\n address to,\n uint256 indexed lootToBurn,\n uint256 indexed sharesToBurn,\n address[] tokens\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 amount\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\n\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\n event GovernanceConfigSet(\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ); /*emits when gov config changes*/\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\n event LockManager(bool managerLock); /*emits when admin is locked*/\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\n /// @param _initializationParams Encoded setup information.\n function setUp(bytes memory _initializationParams)\n public\n override(FactoryFriendly)\n initializer\n nonReentrant\n {\n (\n address _lootToken, /*loot ERC20 token*/\n address _sharesToken, /*shares ERC20 token*/\n address _multisendLibrary, /*address of multisend library*/\n address _avatar, /*Safe contract address*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\n ) = abi.decode(\n _initializationParams,\n (address, address, address, address, address, bytes)\n );\n\n require(\n _multisendLibrary != address(0) &&\n _avatar != address(0),\n \"0 addr used\"\n );\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\n\n versionRecipient = \"2.2.5+opengsn.payablewithbaal.irelayrecipient\";\n __Ownable_init();\n __ReentrancyGuard_init();\n __EIP712_init(\"Vote\", \"4\");\n transferOwnership(_avatar);\n\n // Set the Gnosis safe address\n avatar = _avatar;\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\n\n // Set trusted forwarder\n _setTrustedForwarder(_forwarder);\n\n lootToken = IBaalToken(_lootToken);\n sharesToken = IBaalToken(_sharesToken);\n\n /*Set address of Gnosis multisend library to use for all execution*/\n multisendLibrary = _multisendLibrary;\n\n // Execute all setups including but not limited to\n // * mint shares\n // * convert shares to loot\n // * set shamans\n // * set admin configurations\n require(\n exec(\n multisendLibrary,\n 0,\n _initializationMultisendData,\n Enum.Operation.DelegateCall\n ),\n \"call failure setup\"\n );\n\n emit SetupComplete(\n lootToken.paused(),\n sharesToken.paused(),\n gracePeriod,\n votingPeriod,\n proposalOffering,\n quorumPercent,\n sponsorThreshold,\n minRetentionPercent,\n sharesToken.name(),\n sharesToken.symbol(),\n totalShares(),\n totalLoot()\n );\n\n }\n\n /*****************\n PROPOSAL FUNCTIONS\n *****************/\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\n /// @param proposalData Multisend encoded transactions or proposal data\n /// @param details Context for proposal.\n /// @return proposal Count for submitted proposal.\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable nonReentrant returns (uint256) {\n require(\n expiration == 0 ||\n expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n require(baalGas <= 20000000, \"baalGas to high\"); /* gwei 2/3 eth block limit */\n\n bool selfSponsor = false; /*plant sponsor flag*/\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\n } else {\n require(msg.value == proposalOffering, \"Baal requires an offering\"); /*Optional anti-spam gas token tribute*/\n (bool _success, ) = target.call{value: msg.value}(\"\"); /*Send ETH to sink*/\n require(_success, \"could not send\");\n }\n\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\n\n proposalCount++; /*increment proposal counter*/\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\n proposalCount,\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\n selfSponsor\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\n : 0, /* graceEnds */\n expiration,\n baalGas,\n 0, /* yes votes */\n 0, /* no votes */\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\n selfSponsor ? _msgSender() : address(0),\n proposalDataHash\n );\n\n if (selfSponsor) {\n latestSponsoredProposalId = proposalCount;\n }\n\n emit SubmitProposal(\n proposalCount,\n proposalDataHash,\n votingPeriod,\n proposalData,\n expiration,\n baalGas,\n selfSponsor,\n block.timestamp,\n details\n ); /*emit event reflecting proposal submission*/\n\n return proposalCount;\n }\n\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\n /// @param id Number of proposal in `proposals` mapping to sponsor.\n function sponsorProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \"!sponsor\"); /*check 'votes > threshold - required to sponsor proposal*/\n require(state(id) == ProposalState.Submitted, \"!submitted\");\n require(\n prop.expiration == 0 ||\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n\n prop.votingStarts = uint32(block.timestamp);\n\n unchecked {\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\n prop.graceEnds =\n uint32(block.timestamp) +\n votingPeriod +\n gracePeriod;\n }\n\n prop.prevProposalId = latestSponsoredProposalId;\n prop.sponsor = _msgSender();\n // snapshot both total supply and total shares\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\n latestSponsoredProposalId = id;\n\n emit SponsorProposal(_msgSender(), id, block.timestamp);\n }\n\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function submitVote(uint32 id, bool approved) external nonReentrant {\n _submitVote(_msgSender(), id, approved);\n }\n\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\n /// @param voter Address of member who submitted vote.\n /// @param expiry Expiration of signature.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n /// @param v v in signature\n /// @param r r in signature\n /// @param s s in signature\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external nonReentrant {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n require(nonce == votingNonces[voter], \"!nonce\");\n\n /*calculate EIP-712 struct hash*/\n bytes32 structHash = keccak256(\n abi.encode(\n VOTE_TYPEHASH,\n keccak256(abi.encodePacked(sharesToken.name())),\n voter,\n expiry,\n nonce,\n id,\n approved\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n\n require(signer == voter, \"invalid signature\");\n require(signer != address(0), \"!signer\");\n votingNonces[voter] += 1;\n\n _submitVote(signer, id, approved);\n }\n\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\n /// @param voter Address of voter\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function _submitVote(\n address voter,\n uint32 id,\n bool approved\n ) internal {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n require(state(id) == ProposalState.Voting, \"!voting\");\n\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\n\n require(balance > 0, \"!member\"); /* check that user has shares*/\n require(!memberVoted[voter][id], \"voted\"); /*check vote not already cast*/\n\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\n\n // get high water mark on all votes\n uint256 _totalSupply = totalSupply();\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\n }\n\n unchecked {\n if (approved) {\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\n prop.yesVotes += balance; \n } else {\n /*otherwise, cast delegated balance `noVotes` to proposal*/\n prop.noVotes += balance;\n }\n }\n\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\n }\n\n /// @notice Process `proposal` & execute internal functions.\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n function processProposal(uint32 id, bytes calldata proposalData)\n external\n nonReentrant\n {\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\n\n require(prop.sponsor != address(0), \"!sponsor\"); /*check proposal has been sponsored*/\n require(state(id) == ProposalState.Ready, \"!ready\"); /* check proposal is Ready to process */\n\n ProposalState prevProposalState = state(prop.prevProposalId);\n require(\n prevProposalState == ProposalState.Processed ||\n prevProposalState == ProposalState.Cancelled ||\n prevProposalState == ProposalState.Defeated ||\n prevProposalState == ProposalState.Unborn,\n \"prev!processed\"\n );\n\n // check that the proposalData matches the stored hash\n require(\n hashOperation(proposalData) == prop.proposalDataHash,\n \"incorrect calldata\"\n );\n\n require(\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\n \"not enough gas\"\n );\n\n prop.status[1] = true; /*Set processed flag to true*/\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\n\n // Make proposal fail if after expiration\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\n okToExecute = false;\n\n // Make proposal fail if it didn't pass quorum\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\n okToExecute = false;\n\n // Make proposal fail if the minRetentionPercent is exceeded\n if (\n okToExecute &&\n (totalSupply()) <\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\n ) {\n okToExecute = false;\n }\n\n /*check if `proposal` approved by simple majority of members*/\n if (okToExecute) {\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\n bool success = processActionProposal(proposalData); /*execute 'action'*/\n if (!success) {\n prop.status[3] = true;\n }\n }\n\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\n }\n\n /// @notice Internal function to process 'action'[0] proposal.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n /// @return success Success or failure of execution\n function processActionProposal(bytes memory proposalData)\n private\n returns (bool success)\n {\n success = exec(\n multisendLibrary,\n 0,\n proposalData,\n Enum.Operation.DelegateCall\n );\n }\n\n /// @notice Cancel proposal prior to execution\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n function cancelProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id];\n require(state(id) == ProposalState.Voting, \"!voting\");\n require(\n _msgSender() == prop.sponsor ||\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\n sponsorThreshold ||\n isGovernor(_msgSender()),\n \"!cancellable\"\n );\n prop.status[0] = true;\n emit CancelProposal(id);\n }\n\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\n /// proposal or by a delegated signer on the Safe\n /// @param _to address to call\n /// @param _value value to include in wei\n /// @param _data arbitrary transaction data\n function executeAsBaal(\n address _to,\n uint256 _value,\n bytes calldata _data\n ) external baalOnly {\n (bool success, ) = _to.call{value: _value}(_data);\n require(success, \"call failure execute\");\n }\n\n // ****************\n // MEMBER FUNCTIONS\n // ****************\n\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] calldata tokens\n ) external nonReentrant {\n for (uint256 i = 1; i < tokens.length; i++) {\n require(tokens[i] > tokens[i - 1], \"!order\");\n }\n\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\n }\n\n /// @notice Internal execution of rage quite\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function _ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] memory tokens\n ) internal {\n uint256 _totalSupply = totalSupply();\n\n if (lootToBurn != 0) {\n /*gas optimization*/\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\n }\n\n if (sharesToBurn != 0) {\n /*gas optimization*/\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\n }\n\n for (uint256 i = 0; i < tokens.length; i++) {\n uint256 balance;\n if(tokens[i] == ETH) {\n balance = address(target).balance;\n } else {\n (, bytes memory balanceData) = tokens[i].staticcall(\n abi.encodeWithSelector(0x70a08231, address(target))\n ); /*get Baal token balances - 'balanceOf(address)'*/\n balance = abi.decode(balanceData, (uint256));\n }\n\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\n _totalSupply; /*calculate 'fair shair' claims*/\n\n if (amountToRagequit != 0) {\n /*gas optimization to allow higher maximum token limit*/\n tokens[i] == ETH\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\n }\n }\n\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\n }\n\n /*******************\n GUILD MGMT FUNCTIONS\n *******************/\n /// @notice Baal-only function to set shaman status.\n /// @param _shamans Addresses of shaman contracts\n /// @param _permissions Permission level of each shaman in _shamans\n function setShamans(\n address[] calldata _shamans,\n uint256[] calldata _permissions\n ) external baalOnly {\n require(_shamans.length == _permissions.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < _shamans.length; i++) {\n uint256 permission = _permissions[i];\n if (adminLock)\n require(\n permission != 1 &&\n permission != 3 &&\n permission != 5 &&\n permission != 7,\n \"admin lock\"\n );\n if (managerLock)\n require(\n permission != 2 &&\n permission != 3 &&\n permission != 6 &&\n permission != 7,\n \"manager lock\"\n );\n if (governorLock)\n require(\n permission != 4 &&\n permission != 5 &&\n permission != 6 &&\n permission != 7,\n \"governor lock\"\n );\n shamans[_shamans[i]] = permission;\n emit ShamanSet(_shamans[i], permission);\n }\n }\n\n /// @notice Lock admin so setShamans cannot be called with admin changes\n function lockAdmin() external baalOnly {\n adminLock = true;\n\n emit LockAdmin(adminLock);\n }\n\n /// @notice Lock manager so setShamans cannot be called with manager changes\n function lockManager() external baalOnly {\n managerLock = true;\n\n emit LockManager(managerLock);\n }\n\n /// @notice Lock governor so setShamans cannot be called with governor changes\n function lockGovernor() external baalOnly {\n governorLock = true;\n\n emit LockGovernor(governorLock);\n }\n\n // ****************\n // SHAMAN FUNCTIONS\n // ****************\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\n /// @param pauseShares Turn share transfers on or off\n /// @param pauseLoot Turn loot transfers on or off\n function setAdminConfig(bool pauseShares, bool pauseLoot)\n external\n baalOrAdminOnly\n {\n\n if(pauseShares && !sharesToken.paused()){\n sharesToken.pause();\n emit SharesPaused(true);\n } else if(!pauseShares && sharesToken.paused()){\n sharesToken.unpause();\n emit SharesPaused(false);\n }\n\n if(pauseLoot && !lootToken.paused()){\n lootToken.pause();\n emit LootPaused(true);\n } else if(!pauseLoot && lootToken.paused()){\n lootToken.unpause();\n emit LootPaused(false);\n }\n }\n\n /// @notice Baal-or-manager-only function to mint shares.\n /// @param to Array of addresses to receive shares\n /// @param amount Array of amounts to mint\n function mintShares(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `shares`.\n /// @param to Address to receive shares\n /// @param shares Amount to mint\n function _mintShares(address to, uint256 shares) private {\n sharesToken.mint(to, shares);\n }\n\n /// @notice Baal-or-manager-only function to burn shares.\n /// @param from Array of addresses to lose shares\n /// @param amount Array of amounts to burn\n function burnShares(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `shares`.\n /// @param from Address to lose shares\n /// @param shares Amount to burn\n function _burnShares(address from, uint256 shares) private {\n sharesToken.burn(from, shares);\n }\n\n /// @notice Baal-or-manager-only function to mint loot.\n /// @param to Array of addresses to mint loot\n /// @param amount Array of amounts to mint\n function mintLoot(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `loot`.\n /// @param to Address to mint loot\n /// @param loot Amount to mint\n function _mintLoot(address to, uint256 loot) private {\n lootToken.mint(to, loot);\n }\n\n /// @notice Baal-or-manager-only function to burn loot.\n /// @param from Array of addresses to lose loot\n /// @param amount Array of amounts to burn\n function burnLoot(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `loot`.\n /// @param from Address to lose loot\n /// @param loot Amount to burn\n function _burnLoot(address from, uint256 loot) private {\n lootToken.burn(from, loot);\n }\n\n /// @notice Baal-or-governance-only function to change periods.\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\n function setGovernanceConfig(bytes memory _governanceConfig)\n external\n baalOrGovernorOnly\n {\n (\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ) = abi.decode(\n _governanceConfig,\n (uint32, uint32, uint256, uint256, uint256, uint256)\n );\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\n\n // on initialization of governance config, there is no shares token\n // skip this check on initialization of governance config.\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\n }\n\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\n proposalOffering = newOffering; /*set new proposal offering amount */\n quorumPercent = quorum;\n sponsorThreshold = sponsor;\n minRetentionPercent = minRetention;\n\n emit GovernanceConfigSet(\n voting,\n grace,\n newOffering,\n quorum,\n sponsor,\n minRetention\n );\n }\n\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\n /// @param _trustedForwarderAddress Trusted forwarder's address\n function setTrustedForwarder(address _trustedForwarderAddress)\n external\n baalOrGovernorOnly\n {\n _setTrustedForwarder(_trustedForwarderAddress);\n emit SetTrustedForwarder(_trustedForwarderAddress);\n }\n\n /***************\n GETTER FUNCTIONS\n ***************/\n /// @notice State helper to determine proposal state\n /// @param id Number of proposal in proposals\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n /// \\-> Cancelled \\-> Defeated\n function state(uint32 id) public view returns (ProposalState) {\n Proposal memory prop = proposals[id];\n if (prop.id == 0) {\n /*Uninitialized state*/\n return ProposalState.Unborn;\n } else if (\n prop.status[0] /* cancelled */\n ) {\n return ProposalState.Cancelled;\n } else if (\n prop.votingStarts == 0 /*Voting has not started*/\n ) {\n return ProposalState.Submitted;\n } else if (\n block.timestamp <= prop.votingEnds /*Voting in progress*/\n ) {\n return ProposalState.Voting;\n } else if (\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\n ) {\n return ProposalState.Grace;\n } else if (\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\n ) {\n return ProposalState.Defeated;\n } else if (\n prop.status[1] /* processed */\n ) {\n return ProposalState.Processed;\n }\n /* Proposal is ready to be processed*/\n else {\n return ProposalState.Ready;\n }\n }\n\n /// @notice Helper to get recorded proposal flags\n /// @param id Number of proposal in proposals\n /// @return [cancelled, processed, passed, actionFailed]\n function getProposalStatus(uint32 id)\n external\n view\n returns (bool[4] memory)\n {\n return proposals[id].status;\n }\n\n /// @notice Helper to check if shaman permission contains admin capabilities\n /// @param shaman Address attempting to execute admin permissioned functions\n function isAdmin(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 1 ||\n permission == 3 ||\n permission == 5 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains manager capabilities\n /// @param shaman Address attempting to execute manager permissioned functions\n function isManager(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 2 ||\n permission == 3 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains governor capabilities\n /// @param shaman Address attempting to execute governor permissioned functions\n function isGovernor(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 4 ||\n permission == 5 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check total supply of child loot contract\n function totalLoot() public view returns (uint256) {\n return lootToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of child shares contract\n function totalShares() public view returns (uint256) {\n return sharesToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of loot and shares\n function totalSupply() public view returns (uint256) {\n return totalLoot() + totalShares();\n }\n\n /***************\n HELPER FUNCTIONS\n ***************/\n /// @notice Returns the keccak256 hash of calldata\n function hashOperation(bytes memory _transactions)\n public\n pure\n virtual\n returns (bytes32 hash)\n {\n return keccak256(abi.encode(_transactions));\n }\n\n /// @notice Provides 'safe' {transfer} for ETH.\n function _safeTransferETH(address to, uint256 amount) internal {\n // transfer eth from target\n (bool success, ) = execAndReturnData(\n to,\n amount,\n \"\",\n Enum.Operation.Call\n );\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\n function _safeTransfer(\n address token,\n address to,\n uint256 amount\n ) private {\n (bool success, bytes memory data) = execAndReturnData(\n token,\n 0,\n abi.encodeWithSelector(0xa9059cbb, to, amount),\n Enum.Operation.Call\n ); /*'transfer(address,uint)'*/\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"transfer failed\"\n ); /*checks success & allows non-conforming transfers*/\n }\n\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (address sender) {\n sender = BaseRelayRecipient._msgSender();\n }\n\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (bytes calldata) {\n return BaseRelayRecipient._msgData();\n }\n}\n" + }, + "contracts/fixtures/GnosisImports.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\n" + }, + "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\";\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../Baal.sol\";\nimport \"../interfaces/IBaalSummoner.sol\";\n\ncontract BaalAdvTokenSummoner is\n Initializable,\n OwnableUpgradeable,\n UUPSUpgradeable\n{\n IBaalSummoner public _baalSummoner;\n\n event setSummoner(address summoner);\n\n event DeployBaalTokens(address lootToken, address sharesToken);\n\n constructor() {\n _disableInitializers();\n }\n\n function initialize() public initializer {\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n /**\n * @dev Sets the address of the BaalSummoner contract\n * @param baalSummoner The address of the BaalSummoner contract\n */\n function setSummonerAddr(address baalSummoner) public onlyOwner {\n require(baalSummoner != address(0), \"zero address\");\n _baalSummoner = IBaalSummoner(baalSummoner);\n emit setSummoner(baalSummoner);\n }\n\n /**\n * @dev Summon a new Baal contract with a new set of tokens\n * @param _safeAddr The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\n * @param _forwarderAddr The address of the forwarder to be used, 0x0 if not set\n * @param _saltNonce The salt nonce to be used for the Safe contract\n * @param initializationMintParams The parameters for minting the tokens\n * @param initializationTokenParams The parameters for deploying the tokens\n * @param postInitializationActions The actions to be performed after the initialization\n */\n function summonBaalFromReferrer(\n address _safeAddr,\n address _forwarderAddr,\n uint256 _saltNonce,\n bytes calldata initializationMintParams,\n bytes calldata initializationTokenParams,\n bytes[] calldata postInitializationActions\n ) external {\n // summon tokens\n (address _lootToken, address _sharesToken) = deployTokens(\n initializationTokenParams\n );\n\n // mint shares loot tokens\n mintTokens(initializationMintParams, _lootToken, _sharesToken);\n\n // summon baal with new tokens\n address _baal = _baalSummoner.summonBaalFromReferrer(\n abi.encode(\n IBaalToken(_sharesToken).name(), \n IBaalToken(_sharesToken).symbol(),\n _safeAddr,\n _forwarderAddr,\n _lootToken,\n _sharesToken\n ),\n postInitializationActions,\n _saltNonce,\n bytes32(bytes(\"DHAdvTokenSummoner\")) // referrer\n );\n\n // change token ownership to baal\n IBaalToken(_lootToken).transferOwnership(address(_baal));\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\n }\n\n /**\n * @dev mintTokens\n * @param initializationTokens The parameters for minting the tokens\n * @param _lootToken The loot token address\n * @param _sharesToken The shares token address\n */\n function mintTokens(\n bytes calldata initializationTokens,\n address _lootToken,\n address _sharesToken\n ) internal {\n (\n address[] memory summoners, // The address to mint initial tokens to\n uint256[] memory summonerShares, // The amount of shares to mint\n uint256[] memory summonerLoot // The amount of loot to mint\n ) = abi.decode(initializationTokens, (address[], uint256[], uint256[]));\n\n require(\n summoners.length == summonerShares.length &&\n summoners.length == summonerLoot.length,\n \"!array parity\"\n ); /*check array lengths match*/\n\n for (uint256 i = 0; i < summoners.length; i++) {\n if (summonerLoot[i] > 0) {\n IBaalToken(_lootToken).mint(\n summoners[i],\n summonerLoot[i]\n ); /*grant `to` `amount` `loot`*/\n }\n if (summonerShares[i] > 0) {\n IBaalToken(_sharesToken).mint(\n summoners[i],\n summonerShares[i]\n ); /*grant `to` `amount` `shares`*/\n }\n }\n }\n\n /**\n * @dev deployTokens\n * @param initializationParams The parameters for deploying the tokens\n */\n function deployTokens(\n bytes calldata initializationParams\n ) internal returns (address lootToken, address sharesToken) {\n (\n string\n memory _name /*_name Name for erc20 `shares` accounting, empty if token */,\n string\n memory _symbol /*_symbol Symbol for erc20 `shares` accounting, empty if token*/,\n string\n memory _lootName /* name for erc20 `loot` accounting, empty if token */,\n string\n memory _lootSymbol /* symbol for erc20 `loot` accounting, empty if token*/,\n bool _transferableShares /* if shares is transferable */,\n bool _transferableLoot /* if loot is transferable */\n ) = abi.decode(\n initializationParams,\n (string, string, string, string, bool, bool)\n );\n\n address lootSingleton = _baalSummoner.lootSingleton();\n address sharesSingleton = _baalSummoner.sharesSingleton();\n\n lootToken = address(\n new ERC1967Proxy(\n lootSingleton,\n abi.encodeWithSelector(\n IBaalToken(lootSingleton).setUp.selector,\n _lootName,\n _lootSymbol\n )\n )\n );\n\n sharesToken = address(\n new ERC1967Proxy(\n sharesSingleton,\n abi.encodeWithSelector(\n IBaalToken(sharesSingleton).setUp.selector,\n _name,\n _symbol\n )\n )\n );\n if (!_transferableShares) {\n IBaalToken(sharesToken).pause();\n }\n if (!_transferableLoot) {\n IBaalToken(lootToken).pause();\n }\n\n emit DeployBaalTokens(lootToken, sharesToken);\n }\n\n function _authorizeUpgrade(\n address newImplementation\n ) internal override onlyOwner {}\n}\n" + }, + "contracts/higherOrderFactories/BaalAndVaultSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../interfaces/IBaalSummoner.sol\";\n\n/*\nSummon new 'non-ragequitable' treasury Safe (Vaults). (sidecar?)\nCan summon a dao with a new Vault.\nCan summon a new vault for a dao after initial dao setup.\nActs as a register and the owner of the contract or DAO can deactivate\nregister is primarily a helper for UIs\nOwner of the contract can add new vaults, and set current vaults\nContract is upgradable and should be owned by a DAO\n*/\ncontract BaalAndVaultSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\n\n IBaalSummoner public _baalSummoner;\n uint256 public vaultIdx;\n\n struct Vault{\n uint256 id;\n bool active;\n address daoAddress;\n address vaultAddress;\n string name;\n }\n mapping(uint256 => Vault) public vaults;\n mapping(address => address) public delegates;\n\n event SetVault(\n Vault vault\n );\n\n event SetDelegate(\n address daoAddress,\n address delegate\n );\n\n event setSummoner(\n address summoner\n );\n\n function initialize() initializer public {\n __Ownable_init();\n __UUPSUpgradeable_init();\n vaultIdx = 0;\n }\n\n function setSummonerAddr(\n address baalSummoner\n ) public onlyOwner {\n require(baalSummoner != address(0), \"zero address\");\n _baalSummoner = IBaalSummoner(baalSummoner);\n emit setSummoner(baalSummoner);\n }\n\n /** Summon a new baal and add a Vault */\n function summonBaalAndVault(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 saltNonce,\n bytes32 referrer,\n string memory name\n ) external returns (address _daoAddress, address _vaultAddress) {\n _daoAddress = _baalSummoner.summonBaalFromReferrer(\n initializationParams,\n initializationActions,\n saltNonce,\n referrer\n );\n _vaultAddress = summonVault(_daoAddress, name);\n }\n\n /** create and add a Vault(Safe) to an existing DAO */\n function summonVault(\n address daoAddress,\n string memory name\n ) public returns (address _vaultAddress) {\n _vaultAddress = _baalSummoner.deployAndSetupSafe(\n daoAddress\n );\n _setNewVault(name, daoAddress, _vaultAddress);\n }\n\n /** set a Vault as active or not on existing dao (owner only) */\n // Admin functions to help maintain the registry.\n function setVault(\n uint256 id,\n bool active\n ) public onlyOwner\n {\n _setVault(id, active);\n }\n\n /** set a new Vault as active on existing dao (owner only) */\n // Admin functions to help maintain the registry.\n function setNewVault(\n address daoAddress, \n address vaultAddress,\n string memory name\n ) public onlyOwner\n {\n _setNewVault(name, daoAddress, vaultAddress);\n }\n\n /** \n A DAO can set a Vault as inactive \n */\n function deactivateVaultAsDao(\n uint256 id,\n address daoAddress\n ) external\n {\n require(msg.sender == daoAddress || msg.sender == delegates[daoAddress], \"not DAO or delegate\");\n require(vaults[id].daoAddress == daoAddress && vaults[id].active,\"!not active DAO vault\");\n _setVault(id, false);\n }\n\n /** Allow a Dao to set a delegate that can manage vault enteries */\n function setDelegate(\n address daoAddress,\n address delegate\n ) external\n {\n require(msg.sender == daoAddress, \"!DAO\");\n delegates[daoAddress] = delegate;\n emit SetDelegate(daoAddress, delegate);\n }\n\n\n function _setVault(\n uint256 id, \n bool active\n ) internal \n {\n vaults[id].active = active;\n emit SetVault(vaults[id]);\n }\n\n function _setNewVault(\n string memory name,\n address daoAddress, \n address vaultAddress\n ) internal \n {\n vaultIdx += 1;\n vaults[vaultIdx] = Vault(vaultIdx, true, daoAddress, vaultAddress, name);\n emit SetVault(vaults[vaultIdx]);\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n onlyOwner\n override\n {}\n}\n" + }, + "contracts/interfaces/IBaal.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaal {\n function lootToken() external view returns (address);\n function sharesToken() external view returns (address);\n function votingPeriod() external view returns (uint32);\n function gracePeriod() external view returns (uint32);\n function proposalCount() external view returns (uint32);\n function proposalOffering() external view returns (uint256);\n function quorumPercent() external view returns (uint256);\n function sponsorThreshold() external view returns (uint256);\n function minRetentionPercent() external view returns (uint256);\n function latestSponsoredProposalId() external view returns (uint32);\n\n function setUp(bytes memory initializationParams) external;\n function multisendLibrary() external view returns (address);\n // Module\n function avatar() external view returns (address);\n function target() external view returns (address);\n function setAvatar(address avatar) external;\n function setTarget(address avatar) external;\n // BaseRelayRecipient\n function trustedForwarder() external view returns (address);\n function setTrustedForwarder(address trustedForwarderAddress) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n function totalLoot() external view returns (uint256);\n function totalShares() external view returns (uint256);\n function totalSupply() external view returns (uint256);\n function lootPaused() external view returns (bool);\n function sharesPaused() external view returns (bool);\n \n function shamans(address shaman) external view returns (uint256);\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\n function isAdmin(address shaman) external view returns (bool);\n function isManager(address shaman) external view returns (bool);\n function isGovernor(address shaman) external view returns (bool);\n function lockAdmin() external;\n function lockManager() external;\n function lockGovernor() external;\n function adminLock() external view returns (bool);\n function managerLock() external view returns (bool);\n function governorLock() external view returns (bool);\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n function setGovernanceConfig(bytes memory governanceConfig) external;\n\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable returns (uint256);\n function sponsorProposal(uint32 id) external;\n function processProposal(uint32 id, bytes calldata proposalData) external;\n function cancelProposal(uint32 id) external;\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\n function submitVote(uint32 id, bool approved) external;\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\n\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\n}\n" + }, + "contracts/interfaces/IBaalSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalSummoner {\n event AdminChanged(address previousAdmin, address newAdmin);\n event BeaconUpgraded(address indexed beacon);\n event DaoReferral(bytes32 referrer, address daoAddress);\n event DeployBaalSafe(address baalSafe, address moduleAddr);\n event DeployBaalTokens(address lootToken, address sharesToken);\n event Initialized(uint8 version);\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event SetAddrsVersion(uint256 version);\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n event Upgraded(address indexed implementation);\n\n function setAddrs(\n address _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) external;\n\n function initialize() external;\n\n function transferOwnership(address newOwner) external;\n function upgradeTo(address newImplementation) external;\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\n function renounceOwnership() external;\n\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\n external\n returns (address);\n function summonBaalFromReferrer(\n bytes memory initializationParams,\n bytes[] memory initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address);\n\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\n function deployTokens(string memory _name, string memory _symbol)\n external\n returns (address lootToken, address sharesToken);\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend);\n function addrsVersion() external view returns (uint256);\n function gnosisFallbackLibrary() external view returns (address);\n function gnosisMultisendLibrary() external view returns (address);\n function gnosisSingleton() external view returns (address);\n function lootSingleton() external view returns (address);\n function sharesSingleton() external view returns (address);\n function owner() external view returns (address);\n function proxiableUUID() external view returns (bytes32);\n function template() external view returns (address);\n}\n" + }, + "contracts/interfaces/IBaalToken.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalToken {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function setUp(string memory _name, string memory _symbol) external;\n\n function mint(address recipient, uint256 amount) external;\n\n function burn(address account, uint256 amount) external;\n\n function pause() external;\n\n function unpause() external;\n\n function paused() external view returns (bool);\n \n function transferOwnership(address newOwner) external;\n\n function owner() external view returns (address);\n\n function balanceOf(address account) external view returns (uint256);\n\n function totalSupply() external view returns (uint256);\n\n function snapshot() external returns(uint256);\n\n function getCurrentSnapshotId() external returns(uint256);\n\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\n\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\n\n // below is shares token specific\n struct Checkpoint {\n uint32 fromTimePoint;\n uint256 votes;\n }\n\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\n\n function numCheckpoints(address) external view returns (uint256);\n\n function getCheckpoint(address, uint256)\n external\n view\n returns (Checkpoint memory);\n\n function getVotes(address account) external view returns (uint256);\n\n function delegates(address account) external view returns (address);\n\n function delegationNonces(address account) external view returns (uint256);\n\n function delegate(address delegatee) external;\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "contracts/LootERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\ncontract Loot is\n ERC20SnapshotUpgradeable,\n ERC20PermitUpgradeable,\n PausableUpgradeable,\n OwnableUpgradeable,\n UUPSUpgradeable\n{\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure loot - called by Baal on summon\n /// @dev initializer should prevent this from being called again\n /// @param name_ Name for ERC20 token trackers\n /// @param symbol_ Symbol for ERC20 token trackers\n function setUp(string memory name_, string memory symbol_)\n external\n initializer\n {\n require(bytes(name_).length != 0, \"loot: name empty\");\n require(bytes(symbol_).length != 0, \"loot: symbol empty\");\n\n __ERC20_init(name_, symbol_);\n __ERC20Permit_init(name_);\n __Pausable_init();\n __ERC20Snapshot_init();\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n /// @notice Allows baal to create a snapshot\n function snapshot() external onlyOwner returns(uint256) {\n return _snapshot();\n }\n\n /// @notice get current SnapshotId\n function getCurrentSnapshotId() external view returns (uint256) {\n return _getCurrentSnapshotId();\n }\n\n /// @notice Baal-only function to pause shares.\n function pause() public onlyOwner {\n _pause();\n }\n\n /// @notice Baal-only function to pause shares.\n function unpause() public onlyOwner {\n _unpause();\n }\n\n /// @notice Baal-only function to mint loot.\n /// @param recipient Address to receive loot\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n // can not be more than half the max because of totalsupply of loot and shares\n require(totalSupply() + amount <= type(uint256).max / 2, \"loot: cap exceeded\");\n _mint(recipient, amount);\n }\n\n /// @notice Baal-only function to burn loot.\n /// @param account Address to lose loot\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice Internal hook to restrict token transfers unless allowed by baal\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `loot` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n require(\n from == address(0) || /*Minting allowed*/\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\n !paused(),\n \"loot: !transferable\"\n );\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/mock/BaalLessToken.sol": { + "content": "pragma solidity 0.8.7;\n//SPDX-License-Identifier: MIT\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../utils/BaalVotes.sol\";\nimport \"../interfaces/IBaal.sol\";\n\n// import \"hardhat/console.sol\";\n\n/// @title Shares\n/// @notice Accounting for Baal non voting shares\ncontract BaalLessShares is BaalVotes, OwnableUpgradeable, UUPSUpgradeable {\n // Baal Config\n IBaal public baal;\n uint8 public version;\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure shares - called by Baal on summon\n /// @param _version new version\n function setUp(uint8 _version)\n external\n reinitializer(_version)\n {\n baal = IBaal(address(0)); /*Configure Baal to setup sender*/\n version = _version;\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n\n /// @notice owner-only function to mint shares.\n /// @param recipient Address to receive shares\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n unchecked {\n if (totalSupply() + amount <= type(uint256).max / 2) {\n _mint(recipient, amount);\n }\n }\n }\n\n /// @notice owner-only function to burn shares.\n /// @param account Address to lose shares\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice new before transfer\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `shares` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(BaalVotes) {\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/mock/MockBaal.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts/proxy/Clones.sol\";\n\nimport \"../Baal.sol\";\n\ncontract MockBaal {\n bool public lootPaused;\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n\n constructor(\n address payable _lootSingleton,\n string memory _name,\n string memory _symbol\n ) {\n /*Clone loot singleton using EIP1167 minimal proxy pattern*/\n lootToken = IBaalToken(Clones.clone(_lootSingleton));\n lootToken.setUp(\n string(abi.encodePacked(_name, \" LOOT\")),\n string(abi.encodePacked(_symbol, \"-LOOT\"))\n );\n }\n\n function setLootPaused(bool paused) external {\n if(!lootToken.paused() && paused){\n lootToken.pause();\n } else if(lootToken.paused() && !paused){\n lootToken.unpause();\n }\n lootPaused = paused;\n }\n\n function mintLoot(address _to, uint256 _amount) external {\n lootToken.mint(_to, _amount);\n }\n\n function burnLoot(address _from, uint256 _amount) external {\n lootToken.burn(_from, _amount);\n }\n}\n" + }, + "contracts/mock/TestAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.8.7;\n\ncontract Enum {\n enum Operation {\n Call,\n DelegateCall\n }\n}\n\ncontract TestAvatar {\n address public module;\n\n receive() external payable {}\n\n function enableModule(address _module) external {\n module = _module;\n }\n\n function disableModule(address, address) external {\n module = address(0);\n }\n\n function isModuleEnabled(address _module) external view returns (bool) {\n if (module == _module) {\n return true;\n } else {\n return false;\n }\n }\n\n function execTransactionFromModule(\n address payable to,\n uint256 value,\n bytes calldata data,\n uint8 operation\n ) external returns (bool success) {\n require(msg.sender == module, \"Not authorized\");\n if (operation == 1) (success, ) = to.delegatecall(data);\n else (success, ) = to.call{value: value}(data);\n }\n\n function execTransactionFromModuleReturnData(\n address payable to,\n uint256 value,\n bytes calldata data,\n uint8 operation\n ) external returns (bool success, bytes memory returnData) {\n require(msg.sender == module, \"Not authorized\");\n if (operation == 1) (success, ) = to.delegatecall(data);\n else (success, returnData) = to.call{value: value}(data);\n }\n\n function getModulesPaginated(address, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next)\n {\n // Init array with max page size\n array = new address[](pageSize);\n\n array[0] = module;\n next = module;\n }\n}\n" + }, + "contracts/mock/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\n/// @notice Basic ERC20 implementation.\ncontract TestERC20 {\n string public name;\n string public symbol;\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n constructor(string memory _name, string memory _symbol, uint256 _totalSupply) {\n name = _name;\n symbol = _symbol;\n totalSupply = _totalSupply;\n balanceOf[msg.sender] = _totalSupply;\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n function approve(address to, uint256 amount) external returns (bool) {\n allowance[msg.sender][to] = amount;\n emit Approval(msg.sender, to, amount);\n return true;\n }\n\n function transfer(address to, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] -= amount;\n balanceOf[to] += amount;\n emit Transfer(msg.sender, to, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool) {\n if (allowance[from][msg.sender] != type(uint256).max)\n allowance[from][msg.sender] -= amount;\n\n balanceOf[from] -= amount;\n balanceOf[to] += amount;\n emit Transfer(from, to, amount);\n return true;\n }\n}\n" + }, + "contracts/SharesERC20.sol": { + "content": "pragma solidity 0.8.7;\n//SPDX-License-Identifier: MIT\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\n\nimport \"./utils/BaalVotes.sol\";\nimport \"./interfaces/IBaal.sol\";\n\n// import \"hardhat/console.sol\";\n\n/// @title Shares\n/// @notice Accounting for Baal non voting shares\ncontract Shares is BaalVotes, ERC20SnapshotUpgradeable, OwnableUpgradeable, PausableUpgradeable, UUPSUpgradeable {\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure shares - called by Baal on summon\n /// @dev initializer should prevent this from being called again\n /// @param name_ Name for ERC20 token trackers\n /// @param symbol_ Symbol for ERC20 token trackers\n function setUp(string memory name_, string memory symbol_)\n external\n initializer\n {\n require(bytes(name_).length != 0, \"shares: name empty\");\n require(bytes(symbol_).length != 0, \"shares: symbol empty\");\n\n __ERC20_init(name_, symbol_);\n __ERC20Permit_init(name_);\n __Pausable_init();\n __ERC20Snapshot_init();\n __Ownable_init();\n __UUPSUpgradeable_init();\n __EIP712_init_delegation(\"delegation\", \"4\");\n\n\n }\n\n /// @notice Baal-only function to pause shares.\n function pause() public onlyOwner {\n _pause();\n }\n\n /// @notice Baal-only function to unpause shares.\n function unpause() public onlyOwner {\n _unpause();\n }\n\n /// @notice Allows baal to create a snapshot\n function snapshot() external onlyOwner returns(uint256) {\n return _snapshot();\n }\n\n /// @notice get current SnapshotId\n function getCurrentSnapshotId() external view returns (uint256) {\n return _getCurrentSnapshotId();\n }\n\n /// @notice Baal-only function to mint shares.\n /// @param recipient Address to receive shares\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n // can not be more than half the max because of totalsupply of loot and shares\n require(totalSupply() + amount <= type(uint256).max / 2, \"shares: cap exceeded\");\n _mint(recipient, amount);\n }\n\n /// @notice Baal-only function to burn shares.\n /// @param account Address to lose shares\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice Internal hook to restrict token transfers unless allowed by baal\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `shares` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(BaalVotes, ERC20SnapshotUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n require(\n from == address(0) || /*Minting allowed*/\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\n !paused(),\n \"shares: !transferable\"\n );\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/tools/TributeMinion.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\nimport \"../Baal.sol\";\n\ninterface IERC20 {\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n}\n\ncontract TributeMinion {\n event TributeProposal(\n address indexed baal,\n address token,\n uint256 amount,\n address recipient,\n uint256 proposalId\n );\n struct Escrow {\n address token;\n address applicant;\n uint256 amount;\n bool released;\n address safe;\n }\n mapping(address => mapping(uint256 => Escrow)) public escrows;\n\n event EscrowReleased(\n address indexed baal,\n uint32 proposalId,\n address applicant,\n address safe,\n uint256 amount\n );\n\n function encodeTributeProposal(\n address baal,\n uint256 shares,\n uint256 loot,\n address recipient,\n uint32 proposalId,\n address escrow\n ) public pure returns (bytes memory) {\n // Workaround for solidity dynamic memory array\n address[] memory _recipients = new address[](1);\n _recipients[0] = recipient;\n\n bytes memory _releaseEscrow = abi.encodeWithSignature(\n \"releaseEscrow(address,uint32)\",\n baal,\n proposalId\n );\n\n bytes memory tributeMultisend = abi.encodePacked(\n uint8(0),\n escrow,\n uint256(0),\n uint256(_releaseEscrow.length),\n bytes(_releaseEscrow)\n );\n\n if (shares > 0) {\n // Workaround for solidity dynamic memory array\n uint256[] memory _shares = new uint256[](1);\n _shares[0] = shares;\n\n bytes memory _issueShares = abi.encodeWithSignature(\n \"mintShares(address[],uint256[])\",\n _recipients,\n _shares\n );\n\n tributeMultisend = abi.encodePacked(\n tributeMultisend,\n uint8(0),\n baal,\n uint256(0),\n uint256(_issueShares.length),\n bytes(_issueShares)\n );\n }\n if (loot > 0) {\n // Workaround for solidity dynamic memory array\n uint256[] memory _loot = new uint256[](1);\n _loot[0] = loot;\n\n bytes memory _issueLoot = abi.encodeWithSignature(\n \"mintLoot(address[],uint256[])\",\n _recipients,\n _loot\n );\n\n tributeMultisend = abi.encodePacked(\n tributeMultisend,\n uint8(0),\n address(baal),\n uint256(0),\n uint256(_issueLoot.length),\n bytes(_issueLoot)\n );\n }\n\n bytes memory _multisendAction = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n tributeMultisend\n );\n return _multisendAction;\n }\n\n function submitTributeProposal(\n Baal baal,\n address token,\n uint256 amount,\n uint256 shares,\n uint256 loot,\n uint32 expiration,\n uint256 baalgas,\n string memory details\n ) external payable {\n uint32 proposalId = baal.proposalCount() + 1;\n\n bytes memory encodedProposal = encodeTributeProposal(\n address(baal),\n shares,\n loot,\n msg.sender,\n proposalId,\n address(this)\n );\n\n escrows[address(baal)][proposalId] = Escrow(\n token,\n msg.sender,\n amount,\n false,\n baal.target()\n );\n\n baal.submitProposal{value:msg.value}(encodedProposal, expiration, baalgas, details);\n\n emit TributeProposal(\n address(baal),\n token,\n amount,\n msg.sender,\n proposalId\n );\n }\n\n function releaseEscrow(address _baal, uint32 _proposalId) external {\n Baal baal = Baal(_baal);\n Escrow storage escrow = escrows[address(baal)][_proposalId];\n require(!escrow.released, \"Already released\");\n\n bool[4] memory status = baal.getProposalStatus(_proposalId);\n require(status[2], \"Not passed\");\n escrow.released = true;\n\n IERC20 token = IERC20(escrow.token);\n\n emit EscrowReleased(\n _baal,\n _proposalId,\n escrow.applicant,\n escrow.safe,\n escrow.amount\n );\n\n require(\n token.transferFrom(escrow.applicant, escrow.safe, escrow.amount),\n \"Transfer failed\"\n );\n }\n}\n" + }, + "contracts/utils/BaalVotes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"./DelegationEIP712Upgradeable.sol\";\n\n/**\n * @dev similar to Openzeplin ERC20Votes\n *\n * uses timestamp instead of block.number and auto self delegates.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getPriorVotes}.\n *\n */\nabstract contract BaalVotes is ERC20PermitUpgradeable, DelegationEIP712Upgradeable {\n using ECDSAUpgradeable for bytes32;\n\n struct Checkpoint {\n /*Baal checkpoint for marking number of delegated votes*/\n uint32 fromTimePoint; /*unix time for referencing voting balance*/\n uint256 votes; /*votes at given unix time*/\n }\n\n // DELEGATE TRACKING\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints; /*maps record of vote `checkpoints` for each account by index*/\n mapping(address => uint256) public numCheckpoints; /*maps number of `checkpoints` for each account*/\n mapping(address => address) public delegates; /*maps record of each account's `shares` delegate*/\n mapping(address => uint256) public delegationNonces; /*nonces for delegating by signature*/\n\n // SIGNATURE HELPERS\n bytes32 constant DELEGATION_TYPEHASH = keccak256(\"Delegation(string name,address delegatee,uint256 nonce,uint256 expiry)\");\n\n event DelegateChanged(\n address indexed delegator,\n address indexed fromDelegate,\n address indexed toDelegate\n ); /*emits when an account changes its voting delegate*/\n event DelegateVotesChanged(\n address indexed delegate,\n uint256 previousBalance,\n uint256 newBalance\n ); /*emits when a delegate account's voting balance changes*/\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n /*If recipient is receiving their first shares, auto-self delegate*/\n if (balanceOf(to) == 0 && numCheckpoints[to] == 0 && amount > 0) {\n delegates[to] = to;\n }\n\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n\n /// @notice Delegate votes from user to `delegatee`.\n /// @param delegatee The address to delegate votes to.\n function delegate(address delegatee) external virtual {\n _delegate(msg.sender, delegatee);\n }\n\n /// @notice Delegates votes from `signer` to `delegatee` with EIP-712 signature.\n /// @param delegatee The address to delegate 'votes' to.\n /// @param nonce The contract state required to match the signature.\n /// @param expiry The time at which to expire the signature.\n /// @param v The v signature\n /// @param r The r signature\n /// @param s The s signature\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(now() <= expiry, \"ERC20Votes: signature expired\");\n address signer = ECDSAUpgradeable.recover(\n _hashTypedDataV4Delegation(\n keccak256(\n abi.encode(\n DELEGATION_TYPEHASH,\n keccak256(abi.encodePacked(name())),\n delegatee,\n nonce,\n expiry\n )\n )\n ),\n v,\n r,\n s\n );\n require(signer != address(0), \"ERC20Votes: invalid signer (0x0)\");\n require(nonce == delegationNonces[signer], \"ERC20Votes: invalid nonce\");\n\n delegationNonces[signer]++;\n _delegate(signer, delegatee);\n }\n\n /// @notice Delegates Baal voting weight.\n /// @param delegator The address to delegate 'votes' from.\n /// @param delegatee The address to delegate 'votes' to.\n function _delegate(address delegator, address delegatee) internal virtual {\n require(balanceOf(delegator) > 0, \"!shares\");\n address currentDelegate = delegates[delegator];\n delegates[delegator] = delegatee;\n\n _moveDelegates(\n currentDelegate,\n delegatee,\n uint256(balanceOf(delegator))\n );\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n }\n\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\n /// @param srcRep The address to delegate 'votes' from.\n /// @param dstRep The address to delegate 'votes' to.\n /// @param amount The amount of votes to delegate\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) private {\n unchecked {\n if (srcRep != dstRep && amount != 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum != 0\n ? getCheckpoint(srcRep, srcRepNum - 1).votes\n : 0;\n uint256 srcRepNew = srcRepOld - amount;\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum != 0\n ? getCheckpoint(dstRep, dstRepNum - 1).votes\n : 0;\n uint256 dstRepNew = dstRepOld + amount;\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n }\n\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\n /// @param delegatee The address to snapshot\n /// @param nCheckpoints The number of checkpoints delegatee has\n /// @param oldVotes The number of votes the delegatee had\n /// @param newVotes The number of votes the delegate has now\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) private {\n uint32 timePoint = uint32(now());\n\n unchecked {\n if (\n nCheckpoints != 0 &&\n checkpoints[delegatee][nCheckpoints - 1].fromTimePoint == timePoint\n ) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(\n timePoint,\n newVotes\n );\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /// @notice Returns the current timepoint.\n /// @return timePoint returns unix epoch timestamp\n function now() public view returns (uint256 timePoint) {\n return block.timestamp;\n }\n\n /// @notice Returns the prior number of `votes` for `account` as of `timePoint`.\n /// @param account The user to check `votes` for.\n /// @param timePoint The unix time to check `votes` for.\n /// @return votes Past `votes` delegated to `account`.\n function getPastVotes(address account, uint256 timePoint)\n external\n view\n virtual\n returns (uint256 votes)\n {\n require(timePoint < now(), \"!determined\"); /* Prior votes must be in the past*/\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) return 0;\n\n unchecked {\n if (\n getCheckpoint(account, nCheckpoints - 1).fromTimePoint <=\n timePoint\n ) return getCheckpoint(account, nCheckpoints - 1).votes; /* If most recent checkpoint is at or after desired timepoint, return*/\n if (getCheckpoint(account, 0).fromTimePoint > timePoint) return 0;\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n /* Binary search to look for highest timePoint before desired timePoint*/\n uint256 center = upper - (upper - lower) / 2;\n Checkpoint memory cp = getCheckpoint(account, center);\n if (cp.fromTimePoint == timePoint) return cp.votes;\n else if (cp.fromTimePoint < timePoint) lower = center;\n else upper = center - 1;\n }\n votes = getCheckpoint(account, lower).votes;\n }\n }\n\n /// @notice Returns the current delegated `vote` balance for `account`.\n /// @param account The user to check delegated `votes` for.\n /// @return votes Current `votes` delegated to `account`.\n function getVotes(address account)\n external\n view\n virtual\n returns (uint256 votes)\n {\n uint256 nCheckpoints = numCheckpoints[account]; /*Get most recent checkpoint, or 0 if no checkpoints*/\n unchecked {\n votes = nCheckpoints != 0\n ? getCheckpoint(account, nCheckpoints - 1).votes\n : 0;\n }\n }\n\n function getCheckpoint(address delegatee, uint256 nCheckpoints)\n public\n view\n virtual\n returns (Checkpoint memory)\n {\n return checkpoints[delegatee][nCheckpoints];\n }\n}\n" + }, + "contracts/utils/DelegationEIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4Delegation}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract DelegationEIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME_DELEGATION;\n bytes32 private _HASHED_VERSION_DELEGATION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained_delegation(name, version);\n }\n\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME_DELEGATION = hashedName;\n _HASHED_VERSION_DELEGATION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\n }\n\n function _buildDomainSeparatorDelegation(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_NAME_DELEGATION;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_VERSION_DELEGATION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "contracts/utils/Poster.sol": { + "content": "/*\n██████╗ ██████╗ ███████╗████████╗███████╗██████╗\n██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗\n██████╔╝██║ ██║███████╗ ██║ █████╗ ██████╔╝\n██╔═══╝ ██║ ██║╚════██║ ██║ ██╔══╝ ██╔══██╗\n██║ ╚██████╔╝███████║ ██║ ███████╗██║ ██║\n╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝\nA ridiculously simple general purpose social media smart contract.\nIt takes two strings (content and tag) as parameters and emits those strings, along with msg.sender, as an event. That's it.\nMade with ❤️ by Auryn.eth\n*/\n// SPDX-License-Identifier: LGPL-3.0-only\n\npragma solidity 0.8.7;\n\ncontract Poster {\n event NewPost(address indexed user, string content, string indexed tag);\n\n function post(string calldata content, string calldata tag) external {\n emit NewPost(msg.sender, content, tag);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/.chainId b/deployments/sepolia/.chainId new file mode 100644 index 0000000..bd8d1cd --- /dev/null +++ b/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/deployments/sepolia/Baal.json b/deployments/sepolia/Baal.json new file mode 100644 index 0000000..a87e9b1 --- /dev/null +++ b/deployments/sepolia/Baal.json @@ -0,0 +1,2362 @@ +{ + "address": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guard_", + "type": "address" + } + ], + "name": "NotIERC165Compliant", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousAvatar", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAvatar", + "type": "address" + } + ], + "name": "AvatarSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + } + ], + "name": "CancelProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "guard", + "type": "address" + } + ], + "name": "ChangedGuard", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "voting", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "grace", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOffering", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quorum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sponsor", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minRetention", + "type": "uint256" + } + ], + "name": "GovernanceConfigSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "adminLock", + "type": "bool" + } + ], + "name": "LockAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "governorLock", + "type": "bool" + } + ], + "name": "LockGovernor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "managerLock", + "type": "bool" + } + ], + "name": "LockManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "LootPaused", + "type": "event" + }, + { + "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": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "passed", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "actionFailed", + "type": "bool" + } + ], + "name": "ProcessProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lootToBurn", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "sharesToBurn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "Ragequit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "SetTrustedForwarder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "lootPaused", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "sharesPaused", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "gracePeriod", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "votingPeriod", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalOffering", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quorumPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sponsorThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minRetentionPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalShares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalLoot", + "type": "uint256" + } + ], + "name": "SetupComplete", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "shaman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "permission", + "type": "uint256" + } + ], + "name": "ShamanSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "SharesPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "votingStarts", + "type": "uint256" + } + ], + "name": "SponsorProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "proposalDataHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expiration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "selfSponsor", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "SubmitProposal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "SubmitVote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousTarget", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTarget", + "type": "address" + } + ], + "name": "TargetSet", + "type": "event" + }, + { + "inputs": [], + "name": "adminLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "avatar", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "from", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "burnLoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "from", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "burnShares", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "cancelProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeAsBaal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuard", + "outputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "getProposalStatus", + "outputs": [ + { + "internalType": "bool[4]", + "name": "", + "type": "bool[4]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governorLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gracePeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guard", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_transactions", + "type": "bytes" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isAdmin", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isGovernor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shaman", + "type": "address" + } + ], + "name": "isManager", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestSponsoredProposalId", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lockAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lockGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lockManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootToken", + "outputs": [ + { + "internalType": "contract IBaalToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "managerLock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "memberVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minRetentionPercent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "mintLoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amount", + "type": "uint256[]" + } + ], + "name": "mintShares", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "multisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + } + ], + "name": "processProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proposalCount", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalOffering", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "prevProposalId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingStarts", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "votingEnds", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "graceEnds", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "yesVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "noVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotalSharesAndLootAtVote", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotalSharesAtSponsor", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "proposalDataHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumPercent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "sharesToBurn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lootToBurn", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "ragequit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "pauseShares", + "type": "bool" + }, + { + "internalType": "bool", + "name": "pauseLoot", + "type": "bool" + } + ], + "name": "setAdminConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_avatar", + "type": "address" + } + ], + "name": "setAvatar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_governanceConfig", + "type": "bytes" + } + ], + "name": "setGovernanceConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guard", + "type": "address" + } + ], + "name": "setGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_shamans", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_permissions", + "type": "uint256[]" + } + ], + "name": "setShamans", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "setTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedForwarderAddress", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initializationParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "shamans", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sharesToken", + "outputs": [ + { + "internalType": "contract IBaalToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "sponsorProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sponsorThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum Baal.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "proposalData", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalGas", + "type": "uint256" + }, + { + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "submitProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "submitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "id", + "type": "uint32" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "submitVoteWithSig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "target", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalLoot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "votingNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2e927001ef15a90578a6096fa6005e1d13dbc2d6687b0c3e26c398eeea852d0c", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "transactionIndex": 36, + "gasUsed": "5163841", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000001000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000002000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd0dee02b994ed929a1f2cb2c9e26cfae3b9ca2d6a4a3e189c645c265d5bdb5e3", + "transactionHash": "0x2e927001ef15a90578a6096fa6005e1d13dbc2d6687b0c3e26c398eeea852d0c", + "logs": [ + { + "transactionIndex": 36, + "blockNumber": 4816765, + "transactionHash": "0x2e927001ef15a90578a6096fa6005e1d13dbc2d6687b0c3e26c398eeea852d0c", + "address": "0xc650B598b095613cCddF0f49570FfA475175A5D5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 7, + "blockHash": "0xd0dee02b994ed929a1f2cb2c9e26cfae3b9ca2d6a4a3e189c645c265d5bdb5e3" + } + ], + "blockNumber": 4816765, + "cumulativeGasUsed": "6658136", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "928daf6847beb441da40e990eb20d125", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guard_\",\"type\":\"address\"}],\"name\":\"NotIERC165Compliant\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAvatar\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAvatar\",\"type\":\"address\"}],\"name\":\"AvatarSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"}],\"name\":\"CancelProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"ChangedGuard\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"voting\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"grace\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newOffering\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sponsor\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minRetention\",\"type\":\"uint256\"}],\"name\":\"GovernanceConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"adminLock\",\"type\":\"bool\"}],\"name\":\"LockAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"governorLock\",\"type\":\"bool\"}],\"name\":\"LockGovernor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"managerLock\",\"type\":\"bool\"}],\"name\":\"LockManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"LootPaused\",\"type\":\"event\"},{\"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\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"passed\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"actionFailed\",\"type\":\"bool\"}],\"name\":\"ProcessProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"lootToBurn\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"sharesToBurn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"Ragequit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"SetTrustedForwarder\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"lootPaused\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"sharesPaused\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gracePeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"votingPeriod\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposalOffering\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorumPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sponsorThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minRetentionPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalShares\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalLoot\",\"type\":\"uint256\"}],\"name\":\"SetupComplete\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"permission\",\"type\":\"uint256\"}],\"name\":\"ShamanSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"SharesPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"votingStarts\",\"type\":\"uint256\"}],\"name\":\"SponsorProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"proposalDataHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"votingPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiration\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"selfSponsor\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"SubmitProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"SubmitVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousTarget\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTarget\",\"type\":\"address\"}],\"name\":\"TargetSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adminLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avatar\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"from\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"burnLoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"from\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"burnShares\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"cancelProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_calls\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"encodeMultisend\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedMultisend\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"executeAsBaal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGuard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"getProposalStatus\",\"outputs\":[{\"internalType\":\"bool[4]\",\"name\":\"\",\"type\":\"bool[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governorLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gracePeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guard\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_transactions\",\"type\":\"bytes\"}],\"name\":\"hashOperation\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isAdmin\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"shaman\",\"type\":\"address\"}],\"name\":\"isManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSponsoredProposalId\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lockManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lootToken\",\"outputs\":[{\"internalType\":\"contract IBaalToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerLock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"memberVoted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minRetentionPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"mintLoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"mintShares\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multisendLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"}],\"name\":\"processProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposalCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proposalOffering\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"prevProposalId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingStarts\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"votingEnds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"graceEnds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"yesVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"noVotes\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTotalSharesAndLootAtVote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTotalSharesAtSponsor\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"proposalDataHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorumPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"sharesToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lootToBurn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"ragequit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pauseShares\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"pauseLoot\",\"type\":\"bool\"}],\"name\":\"setAdminConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_avatar\",\"type\":\"address\"}],\"name\":\"setAvatar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_governanceConfig\",\"type\":\"bytes\"}],\"name\":\"setGovernanceConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_guard\",\"type\":\"address\"}],\"name\":\"setGuard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_shamans\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_permissions\",\"type\":\"uint256[]\"}],\"name\":\"setShamans\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"setTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_trustedForwarderAddress\",\"type\":\"address\"}],\"name\":\"setTrustedForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_initializationParams\",\"type\":\"bytes\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"shamans\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharesToken\",\"outputs\":[{\"internalType\":\"contract IBaalToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"sponsorProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sponsorThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"enum Baal.ProposalState\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposalData\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalGas\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"submitProposal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"submitVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"submitVoteWithSig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"target\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalLoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"versionRecipient\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"votingNonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingPeriod\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"burnLoot(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to burn\",\"from\":\"Array of addresses to lose loot\"}},\"burnShares(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to burn\",\"from\":\"Array of addresses to lose shares\"}},\"cancelProposal(uint32)\":{\"details\":\"Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\",\"params\":{\"id\":\"Number of proposal in `proposals` mapping to process for execution.\"}},\"executeAsBaal(address,uint256,bytes)\":{\"details\":\"Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\",\"params\":{\"_data\":\"arbitrary transaction data\",\"_to\":\"address to call\",\"_value\":\"value to include in wei\"}},\"getProposalStatus(uint32)\":{\"params\":{\"id\":\"Number of proposal in proposals\"},\"returns\":{\"_0\":\"[cancelled, processed, passed, actionFailed]\"}},\"isAdmin(address)\":{\"params\":{\"shaman\":\"Address attempting to execute admin permissioned functions\"}},\"isGovernor(address)\":{\"params\":{\"shaman\":\"Address attempting to execute governor permissioned functions\"}},\"isManager(address)\":{\"params\":{\"shaman\":\"Address attempting to execute manager permissioned functions\"}},\"mintLoot(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to mint\",\"to\":\"Array of addresses to mint loot\"}},\"mintShares(address[],uint256[])\":{\"params\":{\"amount\":\"Array of amounts to mint\",\"to\":\"Array of addresses to receive shares\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"processProposal(uint32,bytes)\":{\"details\":\"Proposal must have succeeded, not been processed, not expired, retention threshold must be met\",\"params\":{\"id\":\"Number of proposal in `proposals` mapping to process for execution.\",\"proposalData\":\"Packed multisend data to execute via Gnosis multisend library\"}},\"ragequit(address,uint256,uint256,address[])\":{\"params\":{\"lootToBurn\":\"Baal pure economic weight to burn.\",\"sharesToBurn\":\"Baal voting weight to burn.\",\"to\":\"Account that receives 'fair share'.\",\"tokens\":\"Array of tokens to include in rage quit calculation\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAdminConfig(bool,bool)\":{\"params\":{\"pauseLoot\":\"Turn loot transfers on or off\",\"pauseShares\":\"Turn share transfers on or off\"}},\"setAvatar(address)\":{\"details\":\"Sets the avatar to a new avatar (`newAvatar`).\"},\"setGovernanceConfig(bytes)\":{\"params\":{\"_governanceConfig\":\"Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\"}},\"setGuard(address)\":{\"details\":\"Set a guard that checks transactions before execution.\",\"params\":{\"_guard\":\"The address of the guard to be used or the 0 address to disable the guard.\"}},\"setShamans(address[],uint256[])\":{\"params\":{\"_permissions\":\"Permission level of each shaman in _shamans\",\"_shamans\":\"Addresses of shaman contracts\"}},\"setTarget(address)\":{\"details\":\"Sets the target to a new target (`newTarget`).\"},\"setTrustedForwarder(address)\":{\"params\":{\"_trustedForwarderAddress\":\"Trusted forwarder's address\"}},\"setUp(bytes)\":{\"params\":{\"_initializationParams\":\"Encoded setup information.\"}},\"sponsorProposal(uint32)\":{\"params\":{\"id\":\"Number of proposal in `proposals` mapping to sponsor.\"}},\"state(uint32)\":{\"params\":{\"id\":\"Number of proposal in proposals\"},\"returns\":{\"_0\":\"Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed \\\\-> Cancelled \\\\-> Defeated\"}},\"submitProposal(bytes,uint32,uint256,string)\":{\"params\":{\"details\":\"Context for proposal.\",\"proposalData\":\"Multisend encoded transactions or proposal data\"},\"returns\":{\"_0\":\"proposal Count for submitted proposal.\"}},\"submitVote(uint32,bool)\":{\"params\":{\"approved\":\"If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\",\"id\":\"Number of proposal in `proposals` mapping to cast vote on.\"}},\"submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)\":{\"params\":{\"approved\":\"If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\",\"expiry\":\"Expiration of signature.\",\"id\":\"Number of proposal in `proposals` mapping to cast vote on.\",\"r\":\"r in signature\",\"s\":\"s in signature\",\"v\":\"v in signature\",\"voter\":\"Address of member who submitted vote.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Baal ';_;'.\",\"version\":1},\"userdoc\":{\"errors\":{\"NotIERC165Compliant(address)\":[{\"notice\":\"`guard_` does not implement IERC165.\"}]},\"kind\":\"user\",\"methods\":{\"burnLoot(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to burn loot.\"},\"burnShares(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to burn shares.\"},\"cancelProposal(uint32)\":{\"notice\":\"Cancel proposal prior to execution\"},\"executeAsBaal(address,uint256,bytes)\":{\"notice\":\"Can only be called by the avatar which means this can only be called if passed by another proposal or by a delegated signer on the Safe\"},\"getProposalStatus(uint32)\":{\"notice\":\"Helper to get recorded proposal flags\"},\"hashOperation(bytes)\":{\"notice\":\"Returns the keccak256 hash of calldata\"},\"isAdmin(address)\":{\"notice\":\"Helper to check if shaman permission contains admin capabilities\"},\"isGovernor(address)\":{\"notice\":\"Helper to check if shaman permission contains governor capabilities\"},\"isManager(address)\":{\"notice\":\"Helper to check if shaman permission contains manager capabilities\"},\"isTrustedForwarder(address)\":{\"notice\":\"return if the forwarder is trusted to forward relayed transactions to us. the forwarder is required to verify the sender's signature, and verify the call is not a replay.\"},\"lockAdmin()\":{\"notice\":\"Lock admin so setShamans cannot be called with admin changes\"},\"lockGovernor()\":{\"notice\":\"Lock governor so setShamans cannot be called with governor changes\"},\"lockManager()\":{\"notice\":\"Lock manager so setShamans cannot be called with manager changes\"},\"mintLoot(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to mint loot.\"},\"mintShares(address[],uint256[])\":{\"notice\":\"Baal-or-manager-only function to mint shares.\"},\"processProposal(uint32,bytes)\":{\"notice\":\"Process `proposal` & execute internal functions.\"},\"ragequit(address,uint256,uint256,address[])\":{\"notice\":\"Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\"},\"setAdminConfig(bool,bool)\":{\"notice\":\"Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\"},\"setAvatar(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setGovernanceConfig(bytes)\":{\"notice\":\"Baal-or-governance-only function to change periods.\"},\"setShamans(address[],uint256[])\":{\"notice\":\"Baal-only function to set shaman status.\"},\"setTarget(address)\":{\"notice\":\"Can only be called by the current owner.\"},\"setTrustedForwarder(address)\":{\"notice\":\"Baal-or-governance only function to set trusted forwarder for meta-transactions.\"},\"setUp(bytes)\":{\"notice\":\"Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\"},\"sponsorProposal(uint32)\":{\"notice\":\"Sponsor proposal to Baal `members` for approval within voting period.\"},\"state(uint32)\":{\"notice\":\"State helper to determine proposal state\"},\"submitProposal(bytes,uint32,uint256,string)\":{\"notice\":\"Submit proposal to Baal `members` for approval within given voting period.\"},\"submitVote(uint32,bool)\":{\"notice\":\"Submit vote - proposal must exist & voting period must not have ended.\"},\"submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)\":{\"notice\":\"Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\"},\"totalLoot()\":{\"notice\":\"Helper to check total supply of child loot contract\"},\"totalShares()\":{\"notice\":\"Helper to check total supply of child shares contract\"},\"totalSupply()\":{\"notice\":\"Helper to check total supply of loot and shares\"}},\"notice\":\"Flexible guild contract inspired by Moloch DAO framework.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Baal.sol\":\"Baal\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b615bef80620000f46000396000f3fe6080604052600436106103a25760003560e01c80638009ba1f116101e7578063cf043df31161010d578063ed0cdf15116100a0578063f460124d1161006f578063f460124d14610b99578063f81cbd2614610bb9578063fab514c014610bcf578063fe47668614610bef57600080fd5b8063ed0cdf1514610b19578063ee4d88ed14610b39578063f2fde38b14610b59578063f3ae241514610b7957600080fd5b8063da35c664116100dc578063da35c66414610a95578063da74222814610ab9578063e19a9dd914610ad9578063e43581b814610af957600080fd5b8063cf043df3146109fa578063d33defc714610a1a578063d4b8399214610a55578063d61f27ae14610a7557600080fd5b8063a4f9edbf11610185578063b634e4e011610154578063b634e4e014610979578063c00d077514610996578063c4e931f6146109bd578063c9106389146109dc57600080fd5b8063a4f9edbf14610904578063acca30a214610924578063b1e3f40c14610939578063b3c98bbb1461095957600080fd5b806398a527cc116101c157806398a527cc1461088a5780639a2f747f146108aa578063a06db7dc146108c0578063a26ec96e146108e457600080fd5b80638009ba1f1461083657806383bf8459146108565780638da5cb5b1461086c57600080fd5b80634526d846116102cc5780635ec286961161026a578063715018a611610239578063715018a6146107c3578063776d1a01146107d85780637ceab3b1146107f85780637da0a8771461081857600080fd5b80635ec286961461074e578063635e99aa1461076e57806367f61f0714610783578063706a6e93146107a357600080fd5b806352ba1da7116102a657806352ba1da7146106a4578063572b6c05146106d15780635aef7de6146107005780635cfd6f7e1461073857600080fd5b80634526d846146106355780634630affc14610655578063486ff0cd1461068257600080fd5b8063136d731a11610344578063258bfe2f11610313578063258bfe2f146105c05780633232444c146105e05780633a82ffc81461060d5780633a98ef391461062057600080fd5b8063136d731a1461055357806316fd265d1461056857806318160ddd1461057d57806324d7806c146105a057600080fd5b8063056b0dcd11610380578063056b0dcd146104d1578063086cfca8146104f35780630a796e19146105135780630f656a211461053357600080fd5b8063013cf08b146103a7578063027cdf451461046e57806302a251a314610498575b600080fd5b3480156103b357600080fd5b5061044c6103c2366004614d28565b60d9602052600090815260409020805460018201546002830154600384015460048501546005860154600787015460089097015463ffffffff80881698600160201b8904821698600160401b8104831698600160601b8204841698600160801b8304851698600160a01b90930490941696909593949193909290916001600160a01b03909116908d565b6040516104659d9c9b9a99989796959493929190614d41565b60405180910390f35b34801561047a57600080fd5b5060d5546104889060ff1681565b6040519015158152602001610465565b3480156104a457600080fd5b5060d0546104bc90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610465565b3480156104dd57600080fd5b506104f16104ec366004614ded565b610c1c565b005b3480156104ff57600080fd5b506104f161050e366004614e4b565b611127565b34801561051f57600080fd5b506104f161052e366004614e7a565b611181565b34801561053f57600080fd5b506104f161054e366004614ee2565b6114b5565b34801561055f57600080fd5b506104f1611763565b34801561057457600080fd5b506104f16117f4565b34801561058957600080fd5b5061059261186e565b604051908152602001610465565b3480156105ac57600080fd5b506104886105bb366004614e4b565b61188f565b3480156105cc57600080fd5b506105926105db366004615010565b6118d4565b3480156105ec57600080fd5b506105926105fb366004614e4b565b60d66020526000908152604090205481565b61059261061b36600461508d565b611904565b34801561062c57600080fd5b50610592611f55565b34801561064157600080fd5b506104f1610650366004614ee2565b611fc3565b34801561066157600080fd5b50610675610670366004614e7a565b612092565b604051610465919061511a565b34801561068e57600080fd5b50610697612103565b60405161046591906151a9565b3480156106b057600080fd5b506105926106bf366004614e4b565b60d86020526000908152604090205481565b3480156106dd57600080fd5b506104886106ec366004614e4b565b60ce546001600160a01b0391821691161490565b34801561070c57600080fd5b50606654610720906001600160a01b031681565b6040516001600160a01b039091168152602001610465565b34801561074457600080fd5b5061059260d35481565b34801561075a57600080fd5b506104f1610769366004614ee2565b612191565b34801561077a57600080fd5b50610592612260565b34801561078f57600080fd5b506104f161079e3660046151bc565b6122aa565b3480156107af57600080fd5b506104f16107be3660046151da565b6122ce565b3480156107cf57600080fd5b506104f16126ba565b3480156107e457600080fd5b506104f16107f3366004614e4b565b6126ce565b34801561080457600080fd5b50606554610720906001600160a01b031681565b34801561082457600080fd5b5060ce546001600160a01b0316610720565b34801561084257600080fd5b5060d054610720906001600160a01b031681565b34801561086257600080fd5b5061059260d45481565b34801561087857600080fd5b506033546001600160a01b0316610720565b34801561089657600080fd5b506104f16108a5366004614ee2565b612728565b3480156108b657600080fd5b5061059260d15481565b3480156108cc57600080fd5b5060d0546104bc90600160c01b900463ffffffff1681565b3480156108f057600080fd5b5060d5546104889062010000900460ff1681565b34801561091057600080fd5b506104f161091f366004615010565b6127f7565b34801561093057600080fd5b506104f1612d49565b34801561094557600080fd5b506104f1610954366004614ee2565b612dce565b34801561096557600080fd5b506104f161097436600461522e565b612e9d565b34801561098557600080fd5b5060da546104bc9063ffffffff1681565b3480156109a257600080fd5b5060da5461072090600160201b90046001600160a01b031681565b3480156109c957600080fd5b5060d55461048890610100900460ff1681565b3480156109e857600080fd5b506065546001600160a01b0316610720565b348015610a0657600080fd5b506104f1610a1536600461527d565b612f7e565b348015610a2657600080fd5b50610488610a35366004615306565b60d760209081526000928352604080842090915290825290205460ff1681565b348015610a6157600080fd5b50606754610720906001600160a01b031681565b348015610a8157600080fd5b50610697610a90366004615334565b613249565b348015610aa157600080fd5b5060d0546104bc90600160e01b900463ffffffff1681565b348015610ac557600080fd5b506104f1610ad4366004614e4b565b613310565b348015610ae557600080fd5b506104f1610af4366004614e4b565b6133bf565b348015610b0557600080fd5b50610488610b14366004614e4b565b6134c1565b348015610b2557600080fd5b506104f1610b34366004615408565b613502565b348015610b4557600080fd5b506104f1610b54366004615010565b613611565b348015610b6557600080fd5b506104f1610b74366004614e4b565b61386f565b348015610b8557600080fd5b50610488610b94366004614e4b565b6138e5565b348015610ba557600080fd5b5060cf54610720906001600160a01b031681565b348015610bc557600080fd5b5061059260d25481565b348015610bdb57600080fd5b506104f1610bea366004614e7a565b613925565b348015610bfb57600080fd5b50610c0f610c0a366004614e7a565b613aea565b6040516104659190615487565b6066546001600160a01b0316610c30613cc6565b6001600160a01b03161480610c4b5750610c4b6105bb613cc6565b610c8d5760405162461bcd60e51b815260206004820152600e60248201526d10b130b0b610131010b0b236b4b760911b60448201526064015b60405180910390fd5b818015610d0e575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c91906154a1565b155b15610db55760d060009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d6357600080fd5b505af1158015610d77573d6000803e3d6000fd5b5050604051600181527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a1610ed8565b81158015610e35575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3591906154a1565b15610ed85760d060009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b5050604051600081527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a15b808015610f59575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5791906154a1565b155b156110005760cf60009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fae57600080fd5b505af1158015610fc2573d6000803e3d6000fd5b5050604051600181527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb925060200190505b60405180910390a15050565b80158015611080575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108091906154a1565b156111235760cf60009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b5050604051600081527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb9250602001905060405180910390a15b5050565b61112f613cd0565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b611189613d49565b63ffffffff8116600090815260d96020526040902060d35460d0546001600160a01b0316639ab24eb06111ba613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122291906154be565b101561125b5760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600161126683613aea565b600781111561127757611277615471565b146112b15760405162461bcd60e51b815260206004820152600a602482015269085cdd589b5a5d1d195960b21b6044820152606401610c84565b8054600160a01b900463ffffffff161580611307575060d05463ffffffff600160c01b82048116916112ec91600160a01b90910416426154ed565b6112f691906154ed565b8154600160a01b900463ffffffff16115b61133d5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b805463ffffffff42818116600160401b026bffffffff00000000000000001984168117855560d08054600160a01b90819004851684018516600160601b0263ffffffff60601b1990931667ffffffffffffffff60401b19909616959095179190911780865590549384048316909101600160c01b9093048216929092018116600160801b0263ffffffff60801b1983168117845560da54600160201b92169190910267ffffffff000000001990911673ffffffff0000000000000000ffffffff000000001990921691909117178155611414613cc6565b6007820180546001600160a01b0319166001600160a01b039290921691909117905561143e61186e565b600482015561144b611f55565b600582015560da805463ffffffff191663ffffffff84169081179091554290611472613cc6565b6001600160a01b03167fd45ad122361f16d6f50d7c4a73638f20ee48eff6186af15224e2a4a1f6d5017160405160405180910390a4506114b26001609c55565b50565b6066546001600160a01b03166114c9613cc6565b6001600160a01b0316146114ef5760405162461bcd60e51b8152600401610c8490615505565b82811461150e5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57600083838381811061152d5761152d61554b565b60d5546020909102929092013592505060ff16156115aa5780600114158015611557575080600314155b8015611564575080600514155b8015611571575080600714155b6115aa5760405162461bcd60e51b815260206004820152600a60248201526961646d696e206c6f636b60b01b6044820152606401610c84565b60d554610100900460ff161561162157806002141580156115cc575080600314155b80156115d9575080600614155b80156115e6575080600714155b6116215760405162461bcd60e51b815260206004820152600c60248201526b6d616e61676572206c6f636b60a01b6044820152606401610c84565b60d55462010000900460ff161561169a5780600414158015611644575080600514155b8015611651575080600614155b801561165e575080600714155b61169a5760405162461bcd60e51b815260206004820152600d60248201526c676f7665726e6f72206c6f636b60981b6044820152606401610c84565b8060d660008888868181106116b1576116b161554b565b90506020020160208101906116c69190614e4b565b6001600160a01b031681526020810191909152604001600020558585838181106116f2576116f261554b565b90506020020160208101906117079190614e4b565b6001600160a01b03167fc456d076c1245c6b9759b3cdcb169e14e00a7739897e501844c8fe5fca6cb2608260405161174191815260200190565b60405180910390a2508061175481615561565b915050611511565b5050505050565b6066546001600160a01b0316611777613cc6565b6001600160a01b03161461179d5760405162461bcd60e51b8152600401610c8490615505565b60d5805462ff0000191662010000908117918290556040517fd9574ee4ccdf21db87aa2c1d1fee3248522d79c07c54bde4a9edeb0620bef71f926117ea92900460ff161515815260200190565b60405180910390a1565b6066546001600160a01b0316611808613cc6565b6001600160a01b03161461182e5760405162461bcd60e51b8152600401610c8490615505565b60d5805460ff191660019081179091556040519081527f5e1c9f68365556a24387c25fd0922af31039bcfc65d36caac57401d310948e59906020016117ea565b6000611878611f55565b611880612260565b61188a91906154ed565b905090565b6001600160a01b038116600090815260d6602052604081205460018114806118b75750806003145b806118c25750806005145b806118cd5750806007145b9392505050565b6000816040516020016118e791906151a9565b604051602081830303815290604052805190602001209050919050565b600061190e613d49565b63ffffffff85161580611954575060d05463ffffffff600160c01b820481169161194191600160a01b90910416426154ed565b61194b91906154ed565b8563ffffffff16115b61198a5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b6301312d008411156119d05760405162461bcd60e51b815260206004820152600f60248201526e0c4c2c2d88ec2e640e8de40d0d2ced608b1b6044820152606401610c84565b60d35460d054600091906001600160a01b0316639ab24eb06119f0613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5891906154be565b10611a6557506001611b4c565b60d1543414611ab65760405162461bcd60e51b815260206004820152601960248201527f4261616c20726571756972657320616e206f66666572696e67000000000000006044820152606401610c84565b6067546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b03576040519150601f19603f3d011682016040523d82523d6000602084013e611b08565b606091505b5050905080611b4a5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5b19081b9bdd081cd95b9960921b6044820152606401610c84565b505b6000611b8d89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b60d08054919250600160e01b90910463ffffffff1690601c611bae8361557c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050604051806101c0016040528060d0601c9054906101000a900463ffffffff1663ffffffff16815260200183611c03576000611c0d565b60da5463ffffffff165b63ffffffff16815260200183611c24576000611c26565b425b63ffffffff16815260200183611c3d576000611c57565b60d054611c5790600160a01b900463ffffffff16426155a0565b63ffffffff16815260200183611c6e576000611c9d565b60d05463ffffffff600160c01b8204811691611c9391600160a01b90910416426155a0565b611c9d91906155a0565b63ffffffff1681526020018863ffffffff168152602001878152602001600081526020016000815260200183611cd4576000611cdc565b611cdc61186e565b815260200183611ced576000611cf5565b611cf5611f55565b8152604080516080810182526000808252602082810182905282840182905260608301919091528301520183611d2c576000611d34565b611d34613cc6565b6001600160a01b03168152602090810183905260d054600160e01b900463ffffffff908116600090815260d983526040908190208451815494860151928601516060870151608088015160a089015193871667ffffffffffffffff1990981697909717600160201b958716959095029490941767ffffffffffffffff60401b1916600160401b9186169190910263ffffffff60601b191617600160601b938516939093029290921767ffffffffffffffff60801b1916600160801b9484169490940263ffffffff60a01b191693909317600160a01b919092160217815560c0820151600182015560e0820151600282015561010082015160038201556101208201516004808301919091556101408301516005830155610160830151611e5f91600684019190614bef565b506101808201516007820180546001600160a01b0319166001600160a01b039092169190911790556101a0909101516008909101558115611ebf5760d05460da8054600160e01b90920463ffffffff1663ffffffff199092169190911790555b8060d0601c9054906101000a900463ffffffff1663ffffffff167fb9956173924f9c1204bae41dd3737d7ed1161846d13183879cdc03c4b9f8d01960d060149054906101000a900463ffffffff168c8c8c8c89428e8e604051611f2a999897969594939291906155f1565b60405180910390a3505060d0546001609c55600160e01b900463ffffffff1690509695505050505050565b60d054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a91906154be565b6066546001600160a01b0316611fd7613cc6565b6001600160a01b03161480611ff25750611ff2610b94613cc6565b61200e5760405162461bcd60e51b8152600401610c8490615652565b82811461202d5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761208085858381811061204d5761204d61554b565b90506020020160208101906120629190614e4b565b8484848181106120745761207461554b565b90506020020135613daa565b8061208a81615561565b915050612030565b61209a614c81565b63ffffffff8216600090815260d9602052604080822081516080810192839052926006909101916004918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116120c8575094979650505050505050565b60db80546121109061567c565b80601f016020809104026020016040519081016040528092919081815260200182805461213c9061567c565b80156121895780601f1061215e57610100808354040283529160200191612189565b820191906000526020600020905b81548152906001019060200180831161216c57829003601f168201915b505050505081565b6066546001600160a01b03166121a5613cc6565b6001600160a01b031614806121c057506121c0610b94613cc6565b6121dc5760405162461bcd60e51b8152600401610c8490615652565b8281146121fb5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761224e85858381811061221b5761221b61554b565b90506020020160208101906122309190614e4b565b8484848181106122425761224261554b565b90506020020135613e15565b8061225881615561565b9150506121fe565b60cf54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b6122b2613d49565b6122c46122bd613cc6565b8383613e4e565b6111236001609c55565b6122d6613d49565b63ffffffff8316600090815260d96020526040902060078101546001600160a01b03166123305760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600561233b85613aea565b600781111561234c5761234c615471565b146123825760405162461bcd60e51b815260206004820152600660248201526521726561647960d01b6044820152606401610c84565b805460009061239d90600160201b900463ffffffff16613aea565b905060068160078111156123b3576123b3615471565b14806123d0575060038160078111156123ce576123ce615471565b145b806123ec575060078160078111156123ea576123ea615471565b145b806124085750600081600781111561240657612406615471565b145b6124455760405162461bcd60e51b815260206004820152600e60248201526d1c1c995d885c1c9bd8d95cdcd95960921b6044820152606401610c84565b816008015461248985858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b146124cb5760405162461bcd60e51b8152602060048201526012602482015271696e636f72726563742063616c6c6461746160701b6044820152606401610c84565b600182015415806124e0575081600101545a10155b61251d5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420656e6f7567682067617360901b6044820152606401610c84565b60068201805461ff0019166101001790558154600190600160a01b900463ffffffff161580159061255c5750825442600160a01b90910463ffffffff16105b15612565575060005b8080156125915750826005015460d25461257f91906156b1565b600284015461258f9060646156b1565b105b1561259a575060005b8080156125ca5750606460d45484600401546125b691906156b1565b6125c091906156d0565b6125c861186e565b105b156125d3575060005b801561264c5760068301805462ff0000191662010000179055604080516020601f870181900481028201810190925285815260009161262d919088908890819084018382808284376000920191909152506140a292505050565b90508061264a5760068401805463ff000000191663010000001790555b505b60068301546040805160ff62010000840481161515825263010000009093049092161515602083015263ffffffff8816917fb4571f7e4e2c2b6e6185e47ab5caa5fe34087299bd49fbae945a4583101ee3f0910160405180910390a25050506126b56001609c55565b505050565b6126c2613cd0565b6126cc60006140cb565b565b6126d6613cd0565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b6066546001600160a01b031661273c613cc6565b6001600160a01b031614806127575750612757610b94613cc6565b6127735760405162461bcd60e51b8152600401610c8490615652565b8281146127925760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c576127e58585838181106127b2576127b261554b565b90506020020160208101906127c79190614e4b565b8484848181106127d9576127d961554b565b9050602002013561411d565b806127ef81615561565b915050612795565b600054610100900460ff16158080156128175750600054600160ff909116105b806128315750303b158015612831575060005460ff166001145b6128945760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff1916600117905580156128b7576000805461ff0019166101001790555b6128bf613d49565b600080600080600080878060200190518101906128dc9190615742565b95509550955095509550955060006001600160a01b0316846001600160a01b03161415801561291357506001600160a01b03831615155b61294d5760405162461bcd60e51b815260206004820152600b60248201526a0c081859191c881d5cd95960aa1b6044820152606401610c84565b6040518060600160405280602d8152602001615b8d602d9139805161297a9160db91602090910190614c9f565b50612983614156565b61298b614185565b6129ca60405180604001604052806004815260200163566f746560e01b815250604051806040016040528060018152602001600d60fa1b8152506141b4565b6129d38361386f565b606680546001600160a01b0385166001600160a01b03199182168117909255606780549091169091179055612a07826141e5565b60cf80546001600160a01b03199081166001600160a01b038981169190911790925560d0805490911687831617905560da8054640100000000600160c01b031916600160201b87841681029190911791829055612a6b929104166000836001614207565b612aac5760405162461bcd60e51b8152602060048201526012602482015271063616c6c206661696c7572652073657475760741b6044820152606401610c84565b60cf5460408051635c975abb60e01b815290517f916f812584e0b001e8c6ab604fa549cc16c9d0b2f60b17aa0b4ff5eefe3e7725926001600160a01b031691635c975abb9160048083019260209291908290030181865afa158015612b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3991906154a1565b60d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb091906154a1565b60d05460d15460d25460d35460d454604080516306fdde0360e01b8152905163ffffffff600160c01b8804811697600160a01b810490911696959493926001600160a01b03909116916306fdde03916004808201926000929091908290030181865afa158015612c24573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c4c91908101906157df565b60d060009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015612c9f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612cc791908101906157df565b612ccf611f55565b612cd7612260565b604051612cef9c9b9a99989796959493929190615827565b60405180910390a1505050505050612d076001609c55565b8015611123576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ff4565b6066546001600160a01b0316612d5d613cc6565b6001600160a01b031614612d835760405162461bcd60e51b8152600401610c8490615505565b60d5805461ff001916610100908117918290556040517fb496b9628e839102454d8b483ba451c4be96675009b637273a00e4ab6a59db72926117ea92900460ff161515815260200190565b6066546001600160a01b0316612de2613cc6565b6001600160a01b03161480612dfd5750612dfd610b94613cc6565b612e195760405162461bcd60e51b8152600401610c8490615652565b828114612e385760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57612e8b858583818110612e5857612e5861554b565b9050602002016020810190612e6d9190614e4b565b848484818110612e7f57612e7f61554b565b9050602002013561421f565b80612e9581615561565b915050612e3b565b6066546001600160a01b0316612eb1613cc6565b6001600160a01b031614612ed75760405162461bcd60e51b8152600401610c8490615505565b6000846001600160a01b0316848484604051612ef49291906158ad565b60006040518083038185875af1925050503d8060008114612f31576040519150601f19603f3d011682016040523d82523d6000602084013e612f36565b606091505b505090508061175c5760405162461bcd60e51b815260206004820152601460248201527363616c6c206661696c757265206578656375746560601b6044820152606401610c84565b612f86613d49565b86421115612fd65760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610c84565b6001600160a01b038816600090815260d8602052604090205486146130265760405162461bcd60e51b8152602060048201526006602482015265216e6f6e636560d01b6044820152606401610c84565b60007f8698fbcc7273f96a670eb203cb707d8ec171123f24eaf075b1e754b71119e59e60d060009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801561309c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130c491908101906157df565b6040516020016130d491906158bd565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905263ffffffff871660c082015285151560e082015261010001604051602081830303815290604052805190602001209050600061315182614258565b90506000613161828787876142a6565b90508a6001600160a01b0316816001600160a01b0316146131b85760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606401610c84565b6001600160a01b0381166131f85760405162461bcd60e51b815260206004820152600760248201526610b9b4b3b732b960c91b6044820152606401610c84565b6001600160a01b038b16600090815260d8602052604081208054600192906132219084906154ed565b909155506132329050818989613e4e565b50505061323f6001609c55565b5050505050505050565b60608060005b84518110156132cc578160008560008885815181106132705761327061554b565b60200260200101515189868151811061328b5761328b61554b565b60200260200101516040516020016132a8969594939291906158d9565b604051602081830303815290604052915080806132c490615561565b91505061324f565b50806040516024016132de91906151a9565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b6066546001600160a01b0316613324613cc6565b6001600160a01b0316148061333f575061333f610b14613cc6565b61337f5760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b613388816141e5565b6040516001600160a01b038216907f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff90600090a250565b6133c7613cd0565b6001600160a01b0381161561346d576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344591906154a1565b61346d576040516358b7533f60e11b81526001600160a01b0382166004820152602401610c84565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6001600160a01b038116600090815260d6602052604081205460048114806134e95750806005145b806118c2575080600614806118cd575060071492915050565b61350a613d49565b60015b818110156135c7578282613522600184615943565b8181106135315761353161554b565b90506020020160208101906135469190614e4b565b6001600160a01b03168383838181106135615761356161554b565b90506020020160208101906135769190614e4b565b6001600160a01b0316116135b55760405162461bcd60e51b815260206004820152600660248201526510b7b93232b960d11b6044820152606401610c84565b806135bf81615561565b91505061350d565b506136078585858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506142c492505050565b61175c6001609c55565b6066546001600160a01b0316613625613cc6565b6001600160a01b031614806136405750613640610b14613cc6565b6136805760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b6000806000806000808680602001905181019061369d919061595a565b949a5092985090965094509250905060648111156136ea5760405162461bcd60e51b815260206004820152600a6024820152696261642071756f72756d60b01b6044820152606401610c84565b606481111561372e5760405162461bcd60e51b815260206004820152601060248201526f3130b21036b4b72932ba32b73a34b7b760811b6044820152606401610c84565b600060d35411801561374a575060d0546001600160a01b031615155b1561379f57613757611f55565b82111561379f5760405162461bcd60e51b815260206004820152601660248201527573706f6e736f72203e20736861726573537570706c7960501b6044820152606401610c84565b63ffffffff8616156137ca5760d0805463ffffffff60a01b1916600160a01b63ffffffff8916021790555b63ffffffff8516156137f55760d0805463ffffffff60c01b1916600160c01b63ffffffff8816021790555b60d184905560d283905560d382905560d48190556040805163ffffffff808916825287166020820152908101859052606081018490526080810183905260a081018290527fc10758ccd7d1dd3330e7bbe13a1a1d6bbb414967932376ee24989bad95edcdc19060c00160405180910390a150505050505050565b613877613cd0565b6001600160a01b0381166138dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b6114b2816140cb565b6001600160a01b038116600090815260d6602052604081205460028114806134e9575080600314806118c2575080600614806118cd575060071492915050565b61392d613d49565b63ffffffff8116600090815260d960205260409020600261394d83613aea565b600781111561395e5761395e615471565b146139955760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60078101546001600160a01b03166139ab613cc6565b6001600160a01b03161480613a53575060d35460d05460078301546001600160a01b0391821691633a46b1a891166139e4600142615943565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015613a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5191906154be565b105b80613a645750613a64610b14613cc6565b613a9f5760405162461bcd60e51b815260206004820152600c60248201526b2163616e63656c6c61626c6560a01b6044820152606401610c84565b60068101805460ff1916600117905560405163ffffffff8316907f8896f24cff41b54acf76c2560861f33cd20fd76c4df0b68a3515c354e4b6c81a90600090a2506114b26001609c55565b63ffffffff818116600090815260d96020908152604080832081516101c08101835281548087168252600160201b8104871694820194909452600160401b8404861681840152600160601b840486166060820152600160801b84048616608080830191909152600160a01b90940490951660a0860152600181015460c0860152600281015460e08601526003810154610100860152600480820154610120870152600582015461014087015282519384019283905293948594909391926101608501929160068501918288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613bb75750505092845250505060078201546001600160a01b03166020820152600890910154604090910152805190915063ffffffff16613c255750600092915050565b6101608101515115613c3a5750600392915050565b604081015163ffffffff16613c525750600192915050565b806060015163ffffffff164211613c6c5750600292915050565b806080015163ffffffff164211613c865750600492915050565b8060e0015181610100015110613c9f5750600792915050565b6101608101516020015115613cb75750600692915050565b50600592915050565b50919050565b600061188a614540565b613cd8613cc6565b6001600160a01b0316613cf36033546001600160a01b031690565b6001600160a01b0316146126cc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b6002609c541415613d9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c84565b6002609c55565b6001609c55565b60cf546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015b600060405180830381600087803b158015613df957600080fd5b505af1158015613e0d573d6000803e3d6000fd5b505050505050565b60cf54604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b63ffffffff8216600090815260d9602052604090206002613e6e84613aea565b6007811115613e7f57613e7f615471565b14613eb65760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60d0548154604051630748d63560e31b81526001600160a01b038781166004830152600160401b90920463ffffffff1660248201526000929190911690633a46b1a890604401602060405180830381865afa158015613f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3d91906154be565b905060008111613f795760405162461bcd60e51b815260206004820152600760248201526610b6b2b6b132b960c91b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff8816845290915290205460ff1615613fdb5760405162461bcd60e51b81526020600482015260056024820152641d9bdd195960da1b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff881684529091528120805460ff1916600117905561401761186e565b9050826004015481111561402d57600483018190555b8315614042576002830180548301905561404d565b600383018054830190555b8315158563ffffffff16876001600160a01b03167f786755545a7e27c12c90cc7f0934514d03fdacfe3684a340b8c4100531e7ecd58560405161409291815260200190565b60405180910390a4505050505050565b60da546000906140c590600160201b90046001600160a01b031682846001614207565b92915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60d054604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b600054610100900460ff1661417d5760405162461bcd60e51b8152600401610c84906159b8565b6126cc614574565b600054610100900460ff166141ac5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145ab565b600054610100900460ff166141db5760405162461bcd60e51b8152600401610c84906159b8565b61112382826145d2565b60ce80546001600160a01b0319166001600160a01b0392909216919091179055565b600061421585858585614613565b5095945050505050565b60d0546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401613ddf565b60006140c5614265614812565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006142b78787878761488d565b9150915061421581614951565b60006142ce61186e565b905082156142e7576142e76142e1613cc6565b84613e15565b83156142fe576142fe6142f8613cc6565b8561411d565b60005b82518110156144ec57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031684838151811061433c5761433c61554b565b60200260200101516001600160a01b0316141561436657506067546001600160a01b031631614434565b600084838151811061437a5761437a61554b565b602090810291909101810151606754604080516001600160a01b03928316602480830191909152825180830390910181526044909101825293840180516001600160e01b03166370a0823160e01b179052519116916143d8916158bd565b600060405180830381855afa9150503d8060008114614413576040519150601f19603f3d011682016040523d82523d6000602084013e614418565b606091505b509150508080602001905181019061443091906154be565b9150505b6000838261444289896154ed565b61444c91906156b1565b61445691906156d0565b905080156144d75773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031685848151811061448e5761448e61554b565b60200260200101516001600160a01b0316146144cd576144c88584815181106144b9576144b961554b565b60200260200101518983614a9f565b6144d7565b6144d78882614b6e565b505080806144e490615561565b915050614301565b5083836144f7613cc6565b6001600160a01b03167fa21c268847f2b8adac3751ed0683330abe9fdd6cc4a7a8fc6787633d4126e0d48886604051614531929190615a03565b60405180910390a45050505050565b60006014361080159061455d575060ce546001600160a01b031633145b1561456f575060131936013560601c90565b503390565b600054610100900460ff1661459b5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145a6613cc6565b6140cb565b600054610100900460ff16613da35760405162461bcd60e51b8152600401610c84906159b8565b600054610100900460ff166145f95760405162461bcd60e51b8152600401610c84906159b8565b815160209283012081519190920120606891909155606955565b6065546000906060906001600160a01b0316801561478557604051633af85da960e11b81526001600160a01b038216906375f0bb529061466a908a908a908a908a9060009081908190819081903390600401615a73565b600060405180830381600087803b15801561468457600080fd5b505af1158015614698573d6000803e3d6000fd5b5050606754604051635229073f60e01b81526001600160a01b039091169250635229073f91506146d2908a908a908a908a90600401615afd565b6000604051808303816000875af11580156146f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526147199190810190615b3c565b604051631264e26d60e31b815260006004820152821515602482015291945092506001600160a01b03821690639327136890604401600060405180830381600087803b15801561476857600080fd5b505af115801561477c573d6000803e3d6000fd5b50505050614808565b606754604051635229073f60e01b81526001600160a01b0390911690635229073f906147bb908a908a908a908a90600401615afd565b6000604051808303816000875af11580156147da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148029190810190615b3c565b90935091505b5094509492505050565b600061188a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61484160685490565b6069546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614948565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614918573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661494157600060019250925050614948565b9150600090505b94509492505050565b600081600481111561496557614965615471565b141561496e5750565b600181600481111561498257614982615471565b14156149d05760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c84565b60028160048111156149e4576149e4615471565b1415614a325760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b6003816004811115614a4657614a46615471565b14156114b25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b600080614b0785600063a9059cbb8787604051602401614ad49291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506000614bd2565b91509150818015614b30575080511580614b30575080806020019051810190614b3091906154a1565b61175c5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610c84565b6000614b8c8383604051806020016040528060008152506000614bd2565b509050806126b55760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606401610c84565b60006060614be286868686614613565b9097909650945050505050565b600183019183908215614c715791602002820160005b83821115614c4257835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c05565b8015614c6f5782816101000a81549060ff0219169055600101602081600001049283019260010302614c42565b505b50614c7d929150614d13565b5090565b60405180608001604052806004906020820280368337509192915050565b828054614cab9061567c565b90600052602060002090601f016020900481019282614ccd5760008555614c71565b82601f10614ce657805160ff1916838001178555614c71565b82800160010185558215614c71579182015b82811115614c71578251825591602001919060010190614cf8565b5b80821115614c7d5760008155600101614d14565b600060208284031215614d3a57600080fd5b5035919050565b60006101a08201905063ffffffff8f16825263ffffffff8e16602083015263ffffffff8d16604083015263ffffffff8c16606083015263ffffffff8b16608083015263ffffffff8a1660a08301528860c08301528760e0830152866101008301528561012083015284610140830152614dc66101608301856001600160a01b03169052565b826101808301529e9d5050505050505050505050505050565b80151581146114b257600080fd5b60008060408385031215614e0057600080fd5b8235614e0b81614ddf565b91506020830135614e1b81614ddf565b809150509250929050565b6001600160a01b03811681146114b257600080fd5b8035614e4681614e26565b919050565b600060208284031215614e5d57600080fd5b81356118cd81614e26565b63ffffffff811681146114b257600080fd5b600060208284031215614e8c57600080fd5b81356118cd81614e68565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008060008060408587031215614ef857600080fd5b84356001600160401b0380821115614f0f57600080fd5b614f1b88838901614e97565b90965094506020870135915080821115614f3457600080fd5b50614f4187828801614e97565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f8b57614f8b614f4d565b604052919050565b60006001600160401b03821115614fac57614fac614f4d565b50601f01601f191660200190565b600082601f830112614fcb57600080fd5b8135614fde614fd982614f93565b614f63565b818152846020838601011115614ff357600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561502257600080fd5b81356001600160401b0381111561503857600080fd5b61504484828501614fba565b949350505050565b60008083601f84011261505e57600080fd5b5081356001600160401b0381111561507557600080fd5b602083019150836020828501011115614edb57600080fd5b600080600080600080608087890312156150a657600080fd5b86356001600160401b03808211156150bd57600080fd5b6150c98a838b0161504c565b9098509650602089013591506150de82614e68565b90945060408801359350606088013590808211156150fb57600080fd5b5061510889828a0161504c565b979a9699509497509295939492505050565b60808101818360005b60048110156151445781511515835260209283019290910190600101615123565b50505092915050565b60005b83811015615168578181015183820152602001615150565b83811115615177576000848401525b50505050565b6000815180845261519581602086016020860161514d565b601f01601f19169290920160200192915050565b6020815260006118cd602083018461517d565b600080604083850312156151cf57600080fd5b8235614e0b81614e68565b6000806000604084860312156151ef57600080fd5b83356151fa81614e68565b925060208401356001600160401b0381111561521557600080fd5b6152218682870161504c565b9497909650939450505050565b6000806000806060858703121561524457600080fd5b843561524f81614e26565b93506020850135925060408501356001600160401b0381111561527157600080fd5b614f418782880161504c565b600080600080600080600080610100898b03121561529a57600080fd5b88356152a581614e26565b9750602089013596506040890135955060608901356152c381614e68565b945060808901356152d381614ddf565b935060a089013560ff811681146152e957600080fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121561531957600080fd5b823561532481614e26565b91506020830135614e1b81614e68565b6000806040838503121561534757600080fd5b82356001600160401b038082111561535e57600080fd5b818501915085601f83011261537257600080fd5b813560208282111561538657615386614f4d565b8160051b615395828201614f63565b928352848101820192828101908a8511156153af57600080fd5b83870192505b848310156153eb578235868111156153cd5760008081fd5b6153db8c86838b0101614fba565b83525091830191908301906153b5565b97506153fb915050878201614e3b565b9450505050509250929050565b60008060008060006080868803121561542057600080fd5b853561542b81614e26565b9450602086013593506040860135925060608601356001600160401b0381111561545457600080fd5b61546088828901614e97565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b602081016008831061549b5761549b615471565b91905290565b6000602082840312156154b357600080fd5b81516118cd81614ddf565b6000602082840312156154d057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615500576155006154d7565b500190565b602080825260059082015264085898585b60da1b604082015260600190565b6020808252600d908201526c2161727261792070617269747960981b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615575576155756154d7565b5060010190565b600063ffffffff80831681811415615596576155966154d7565b6001019392505050565b600063ffffffff8083168185168083038211156155bf576155bf6154d7565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808c16835260e0602084015261561260e084018b8d6155c8565b818a16604085015288606085015287151560808501528660a085015283810360c08501526156418186886155c8565b9d9c50505050505050505050505050565b60208082526010908201526f10b130b0b610131010b6b0b730b3b2b960811b604082015260600190565b600181811c9082168061569057607f821691505b60208210811415613cc057634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156156cb576156cb6154d7565b500290565b6000826156ed57634e487b7160e01b600052601260045260246000fd5b500490565b6000615700614fd984614f93565b905082815283838301111561571457600080fd5b6118cd83602083018461514d565b600082601f83011261573357600080fd5b6118cd838351602085016156f2565b60008060008060008060c0878903121561575b57600080fd5b865161576681614e26565b602088015190965061577781614e26565b604088015190955061578881614e26565b606088015190945061579981614e26565b60808801519093506157aa81614e26565b60a08801519092506001600160401b038111156157c657600080fd5b6157d289828a01615722565b9150509295509295509295565b6000602082840312156157f157600080fd5b81516001600160401b0381111561580757600080fd5b8201601f8101841361581857600080fd5b615044848251602084016156f2565b60006101808e151583528d1515602084015263ffffffff808e166040850152808d166060850152508a60808401528960a08401528860c08401528760e08401528061010084015261587a8184018861517d565b905082810361012084015261588f818761517d565b610140840195909552505061016001529a9950505050505050505050565b8183823760009101908152919050565b600082516158cf81846020870161514d565b9190910192915050565b600087516158eb818460208c0161514d565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b166001820152856015820152846035820152835161593381605584016020880161514d565b0160550198975050505050505050565b600082821015615955576159556154d7565b500390565b60008060008060008060c0878903121561597357600080fd5b865161597e81614e68565b602088015190965061598f81614e68565b6040880151606089015160808a015160a0909a0151989b929a5090989097909650945092505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b81811015615a51578551851683529483019491830191600101615a33565b509098975050505050505050565b60028110615a6f57615a6f615471565b9052565b6001600160a01b038b81168252602082018b905261016060408301819052600091615aa08483018d61517d565b9150615aaf606085018c615a5f565b608084019990995260a08301979097525060c081019490945291851660e084015284166101008301528183036101208301526000835290921661014090920191909152602001949350505050565b60018060a01b0385168152836020820152608060408201526000615b24608083018561517d565b9050615b336060830184615a5f565b95945050505050565b60008060408385031215615b4f57600080fd5b8251615b5a81614ddf565b60208401519092506001600160401b03811115615b7657600080fd5b615b8285828601615722565b915050925092905056fe322e322e352b6f70656e67736e2e70617961626c65776974686261616c2e6972656c6179726563697069656e74a2646970667358221220e7f7a8af70f47c4c0a43ae70fdb50ef5f9643adc80e4e50e8e0c3ddc18ff5f7f64736f6c634300080a0033", + "deployedBytecode": "0x6080604052600436106103a25760003560e01c80638009ba1f116101e7578063cf043df31161010d578063ed0cdf15116100a0578063f460124d1161006f578063f460124d14610b99578063f81cbd2614610bb9578063fab514c014610bcf578063fe47668614610bef57600080fd5b8063ed0cdf1514610b19578063ee4d88ed14610b39578063f2fde38b14610b59578063f3ae241514610b7957600080fd5b8063da35c664116100dc578063da35c66414610a95578063da74222814610ab9578063e19a9dd914610ad9578063e43581b814610af957600080fd5b8063cf043df3146109fa578063d33defc714610a1a578063d4b8399214610a55578063d61f27ae14610a7557600080fd5b8063a4f9edbf11610185578063b634e4e011610154578063b634e4e014610979578063c00d077514610996578063c4e931f6146109bd578063c9106389146109dc57600080fd5b8063a4f9edbf14610904578063acca30a214610924578063b1e3f40c14610939578063b3c98bbb1461095957600080fd5b806398a527cc116101c157806398a527cc1461088a5780639a2f747f146108aa578063a06db7dc146108c0578063a26ec96e146108e457600080fd5b80638009ba1f1461083657806383bf8459146108565780638da5cb5b1461086c57600080fd5b80634526d846116102cc5780635ec286961161026a578063715018a611610239578063715018a6146107c3578063776d1a01146107d85780637ceab3b1146107f85780637da0a8771461081857600080fd5b80635ec286961461074e578063635e99aa1461076e57806367f61f0714610783578063706a6e93146107a357600080fd5b806352ba1da7116102a657806352ba1da7146106a4578063572b6c05146106d15780635aef7de6146107005780635cfd6f7e1461073857600080fd5b80634526d846146106355780634630affc14610655578063486ff0cd1461068257600080fd5b8063136d731a11610344578063258bfe2f11610313578063258bfe2f146105c05780633232444c146105e05780633a82ffc81461060d5780633a98ef391461062057600080fd5b8063136d731a1461055357806316fd265d1461056857806318160ddd1461057d57806324d7806c146105a057600080fd5b8063056b0dcd11610380578063056b0dcd146104d1578063086cfca8146104f35780630a796e19146105135780630f656a211461053357600080fd5b8063013cf08b146103a7578063027cdf451461046e57806302a251a314610498575b600080fd5b3480156103b357600080fd5b5061044c6103c2366004614d28565b60d9602052600090815260409020805460018201546002830154600384015460048501546005860154600787015460089097015463ffffffff80881698600160201b8904821698600160401b8104831698600160601b8204841698600160801b8304851698600160a01b90930490941696909593949193909290916001600160a01b03909116908d565b6040516104659d9c9b9a99989796959493929190614d41565b60405180910390f35b34801561047a57600080fd5b5060d5546104889060ff1681565b6040519015158152602001610465565b3480156104a457600080fd5b5060d0546104bc90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610465565b3480156104dd57600080fd5b506104f16104ec366004614ded565b610c1c565b005b3480156104ff57600080fd5b506104f161050e366004614e4b565b611127565b34801561051f57600080fd5b506104f161052e366004614e7a565b611181565b34801561053f57600080fd5b506104f161054e366004614ee2565b6114b5565b34801561055f57600080fd5b506104f1611763565b34801561057457600080fd5b506104f16117f4565b34801561058957600080fd5b5061059261186e565b604051908152602001610465565b3480156105ac57600080fd5b506104886105bb366004614e4b565b61188f565b3480156105cc57600080fd5b506105926105db366004615010565b6118d4565b3480156105ec57600080fd5b506105926105fb366004614e4b565b60d66020526000908152604090205481565b61059261061b36600461508d565b611904565b34801561062c57600080fd5b50610592611f55565b34801561064157600080fd5b506104f1610650366004614ee2565b611fc3565b34801561066157600080fd5b50610675610670366004614e7a565b612092565b604051610465919061511a565b34801561068e57600080fd5b50610697612103565b60405161046591906151a9565b3480156106b057600080fd5b506105926106bf366004614e4b565b60d86020526000908152604090205481565b3480156106dd57600080fd5b506104886106ec366004614e4b565b60ce546001600160a01b0391821691161490565b34801561070c57600080fd5b50606654610720906001600160a01b031681565b6040516001600160a01b039091168152602001610465565b34801561074457600080fd5b5061059260d35481565b34801561075a57600080fd5b506104f1610769366004614ee2565b612191565b34801561077a57600080fd5b50610592612260565b34801561078f57600080fd5b506104f161079e3660046151bc565b6122aa565b3480156107af57600080fd5b506104f16107be3660046151da565b6122ce565b3480156107cf57600080fd5b506104f16126ba565b3480156107e457600080fd5b506104f16107f3366004614e4b565b6126ce565b34801561080457600080fd5b50606554610720906001600160a01b031681565b34801561082457600080fd5b5060ce546001600160a01b0316610720565b34801561084257600080fd5b5060d054610720906001600160a01b031681565b34801561086257600080fd5b5061059260d45481565b34801561087857600080fd5b506033546001600160a01b0316610720565b34801561089657600080fd5b506104f16108a5366004614ee2565b612728565b3480156108b657600080fd5b5061059260d15481565b3480156108cc57600080fd5b5060d0546104bc90600160c01b900463ffffffff1681565b3480156108f057600080fd5b5060d5546104889062010000900460ff1681565b34801561091057600080fd5b506104f161091f366004615010565b6127f7565b34801561093057600080fd5b506104f1612d49565b34801561094557600080fd5b506104f1610954366004614ee2565b612dce565b34801561096557600080fd5b506104f161097436600461522e565b612e9d565b34801561098557600080fd5b5060da546104bc9063ffffffff1681565b3480156109a257600080fd5b5060da5461072090600160201b90046001600160a01b031681565b3480156109c957600080fd5b5060d55461048890610100900460ff1681565b3480156109e857600080fd5b506065546001600160a01b0316610720565b348015610a0657600080fd5b506104f1610a1536600461527d565b612f7e565b348015610a2657600080fd5b50610488610a35366004615306565b60d760209081526000928352604080842090915290825290205460ff1681565b348015610a6157600080fd5b50606754610720906001600160a01b031681565b348015610a8157600080fd5b50610697610a90366004615334565b613249565b348015610aa157600080fd5b5060d0546104bc90600160e01b900463ffffffff1681565b348015610ac557600080fd5b506104f1610ad4366004614e4b565b613310565b348015610ae557600080fd5b506104f1610af4366004614e4b565b6133bf565b348015610b0557600080fd5b50610488610b14366004614e4b565b6134c1565b348015610b2557600080fd5b506104f1610b34366004615408565b613502565b348015610b4557600080fd5b506104f1610b54366004615010565b613611565b348015610b6557600080fd5b506104f1610b74366004614e4b565b61386f565b348015610b8557600080fd5b50610488610b94366004614e4b565b6138e5565b348015610ba557600080fd5b5060cf54610720906001600160a01b031681565b348015610bc557600080fd5b5061059260d25481565b348015610bdb57600080fd5b506104f1610bea366004614e7a565b613925565b348015610bfb57600080fd5b50610c0f610c0a366004614e7a565b613aea565b6040516104659190615487565b6066546001600160a01b0316610c30613cc6565b6001600160a01b03161480610c4b5750610c4b6105bb613cc6565b610c8d5760405162461bcd60e51b815260206004820152600e60248201526d10b130b0b610131010b0b236b4b760911b60448201526064015b60405180910390fd5b818015610d0e575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c91906154a1565b155b15610db55760d060009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610d6357600080fd5b505af1158015610d77573d6000803e3d6000fd5b5050604051600181527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a1610ed8565b81158015610e35575060d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3591906154a1565b15610ed85760d060009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b5050604051600081527f5544d0c1539dae939ba6e81485fb6352e3081f5a74f9bf445038bdcc358e34159250602001905060405180910390a15b808015610f59575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5791906154a1565b155b156110005760cf60009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fae57600080fd5b505af1158015610fc2573d6000803e3d6000fd5b5050604051600181527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb925060200190505b60405180910390a15050565b80158015611080575060cf60009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108091906154a1565b156111235760cf60009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b5050604051600081527f21b897e32ff7464f696022c4d6dfbf2d4eb300d162ad28e0d90f1136f5fea9cb9250602001905060405180910390a15b5050565b61112f613cd0565b606680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f52ae88b092de36f87fb43fe794eb1381023b9c1bce563a871154022c63dce34290600090a35050565b611189613d49565b63ffffffff8116600090815260d96020526040902060d35460d0546001600160a01b0316639ab24eb06111ba613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156111fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122291906154be565b101561125b5760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600161126683613aea565b600781111561127757611277615471565b146112b15760405162461bcd60e51b815260206004820152600a602482015269085cdd589b5a5d1d195960b21b6044820152606401610c84565b8054600160a01b900463ffffffff161580611307575060d05463ffffffff600160c01b82048116916112ec91600160a01b90910416426154ed565b6112f691906154ed565b8154600160a01b900463ffffffff16115b61133d5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b805463ffffffff42818116600160401b026bffffffff00000000000000001984168117855560d08054600160a01b90819004851684018516600160601b0263ffffffff60601b1990931667ffffffffffffffff60401b19909616959095179190911780865590549384048316909101600160c01b9093048216929092018116600160801b0263ffffffff60801b1983168117845560da54600160201b92169190910267ffffffff000000001990911673ffffffff0000000000000000ffffffff000000001990921691909117178155611414613cc6565b6007820180546001600160a01b0319166001600160a01b039290921691909117905561143e61186e565b600482015561144b611f55565b600582015560da805463ffffffff191663ffffffff84169081179091554290611472613cc6565b6001600160a01b03167fd45ad122361f16d6f50d7c4a73638f20ee48eff6186af15224e2a4a1f6d5017160405160405180910390a4506114b26001609c55565b50565b6066546001600160a01b03166114c9613cc6565b6001600160a01b0316146114ef5760405162461bcd60e51b8152600401610c8490615505565b82811461150e5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57600083838381811061152d5761152d61554b565b60d5546020909102929092013592505060ff16156115aa5780600114158015611557575080600314155b8015611564575080600514155b8015611571575080600714155b6115aa5760405162461bcd60e51b815260206004820152600a60248201526961646d696e206c6f636b60b01b6044820152606401610c84565b60d554610100900460ff161561162157806002141580156115cc575080600314155b80156115d9575080600614155b80156115e6575080600714155b6116215760405162461bcd60e51b815260206004820152600c60248201526b6d616e61676572206c6f636b60a01b6044820152606401610c84565b60d55462010000900460ff161561169a5780600414158015611644575080600514155b8015611651575080600614155b801561165e575080600714155b61169a5760405162461bcd60e51b815260206004820152600d60248201526c676f7665726e6f72206c6f636b60981b6044820152606401610c84565b8060d660008888868181106116b1576116b161554b565b90506020020160208101906116c69190614e4b565b6001600160a01b031681526020810191909152604001600020558585838181106116f2576116f261554b565b90506020020160208101906117079190614e4b565b6001600160a01b03167fc456d076c1245c6b9759b3cdcb169e14e00a7739897e501844c8fe5fca6cb2608260405161174191815260200190565b60405180910390a2508061175481615561565b915050611511565b5050505050565b6066546001600160a01b0316611777613cc6565b6001600160a01b03161461179d5760405162461bcd60e51b8152600401610c8490615505565b60d5805462ff0000191662010000908117918290556040517fd9574ee4ccdf21db87aa2c1d1fee3248522d79c07c54bde4a9edeb0620bef71f926117ea92900460ff161515815260200190565b60405180910390a1565b6066546001600160a01b0316611808613cc6565b6001600160a01b03161461182e5760405162461bcd60e51b8152600401610c8490615505565b60d5805460ff191660019081179091556040519081527f5e1c9f68365556a24387c25fd0922af31039bcfc65d36caac57401d310948e59906020016117ea565b6000611878611f55565b611880612260565b61188a91906154ed565b905090565b6001600160a01b038116600090815260d6602052604081205460018114806118b75750806003145b806118c25750806005145b806118cd5750806007145b9392505050565b6000816040516020016118e791906151a9565b604051602081830303815290604052805190602001209050919050565b600061190e613d49565b63ffffffff85161580611954575060d05463ffffffff600160c01b820481169161194191600160a01b90910416426154ed565b61194b91906154ed565b8563ffffffff16115b61198a5760405162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b6044820152606401610c84565b6301312d008411156119d05760405162461bcd60e51b815260206004820152600f60248201526e0c4c2c2d88ec2e640e8de40d0d2ced608b1b6044820152606401610c84565b60d35460d054600091906001600160a01b0316639ab24eb06119f0613cc6565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5891906154be565b10611a6557506001611b4c565b60d1543414611ab65760405162461bcd60e51b815260206004820152601960248201527f4261616c20726571756972657320616e206f66666572696e67000000000000006044820152606401610c84565b6067546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611b03576040519150601f19603f3d011682016040523d82523d6000602084013e611b08565b606091505b5050905080611b4a5760405162461bcd60e51b815260206004820152600e60248201526d18dbdd5b19081b9bdd081cd95b9960921b6044820152606401610c84565b505b6000611b8d89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b60d08054919250600160e01b90910463ffffffff1690601c611bae8361557c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050604051806101c0016040528060d0601c9054906101000a900463ffffffff1663ffffffff16815260200183611c03576000611c0d565b60da5463ffffffff165b63ffffffff16815260200183611c24576000611c26565b425b63ffffffff16815260200183611c3d576000611c57565b60d054611c5790600160a01b900463ffffffff16426155a0565b63ffffffff16815260200183611c6e576000611c9d565b60d05463ffffffff600160c01b8204811691611c9391600160a01b90910416426155a0565b611c9d91906155a0565b63ffffffff1681526020018863ffffffff168152602001878152602001600081526020016000815260200183611cd4576000611cdc565b611cdc61186e565b815260200183611ced576000611cf5565b611cf5611f55565b8152604080516080810182526000808252602082810182905282840182905260608301919091528301520183611d2c576000611d34565b611d34613cc6565b6001600160a01b03168152602090810183905260d054600160e01b900463ffffffff908116600090815260d983526040908190208451815494860151928601516060870151608088015160a089015193871667ffffffffffffffff1990981697909717600160201b958716959095029490941767ffffffffffffffff60401b1916600160401b9186169190910263ffffffff60601b191617600160601b938516939093029290921767ffffffffffffffff60801b1916600160801b9484169490940263ffffffff60a01b191693909317600160a01b919092160217815560c0820151600182015560e0820151600282015561010082015160038201556101208201516004808301919091556101408301516005830155610160830151611e5f91600684019190614bef565b506101808201516007820180546001600160a01b0319166001600160a01b039092169190911790556101a0909101516008909101558115611ebf5760d05460da8054600160e01b90920463ffffffff1663ffffffff199092169190911790555b8060d0601c9054906101000a900463ffffffff1663ffffffff167fb9956173924f9c1204bae41dd3737d7ed1161846d13183879cdc03c4b9f8d01960d060149054906101000a900463ffffffff168c8c8c8c89428e8e604051611f2a999897969594939291906155f1565b60405180910390a3505060d0546001609c55600160e01b900463ffffffff1690509695505050505050565b60d054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188a91906154be565b6066546001600160a01b0316611fd7613cc6565b6001600160a01b03161480611ff25750611ff2610b94613cc6565b61200e5760405162461bcd60e51b8152600401610c8490615652565b82811461202d5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761208085858381811061204d5761204d61554b565b90506020020160208101906120629190614e4b565b8484848181106120745761207461554b565b90506020020135613daa565b8061208a81615561565b915050612030565b61209a614c81565b63ffffffff8216600090815260d9602052604080822081516080810192839052926006909101916004918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116120c8575094979650505050505050565b60db80546121109061567c565b80601f016020809104026020016040519081016040528092919081815260200182805461213c9061567c565b80156121895780601f1061215e57610100808354040283529160200191612189565b820191906000526020600020905b81548152906001019060200180831161216c57829003601f168201915b505050505081565b6066546001600160a01b03166121a5613cc6565b6001600160a01b031614806121c057506121c0610b94613cc6565b6121dc5760405162461bcd60e51b8152600401610c8490615652565b8281146121fb5760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c5761224e85858381811061221b5761221b61554b565b90506020020160208101906122309190614e4b565b8484848181106122425761224261554b565b90506020020135613e15565b8061225881615561565b9150506121fe565b60cf54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611f9f573d6000803e3d6000fd5b6122b2613d49565b6122c46122bd613cc6565b8383613e4e565b6111236001609c55565b6122d6613d49565b63ffffffff8316600090815260d96020526040902060078101546001600160a01b03166123305760405162461bcd60e51b815260206004820152600860248201526710b9b837b739b7b960c11b6044820152606401610c84565b600561233b85613aea565b600781111561234c5761234c615471565b146123825760405162461bcd60e51b815260206004820152600660248201526521726561647960d01b6044820152606401610c84565b805460009061239d90600160201b900463ffffffff16613aea565b905060068160078111156123b3576123b3615471565b14806123d0575060038160078111156123ce576123ce615471565b145b806123ec575060078160078111156123ea576123ea615471565b145b806124085750600081600781111561240657612406615471565b145b6124455760405162461bcd60e51b815260206004820152600e60248201526d1c1c995d885c1c9bd8d95cdcd95960921b6044820152606401610c84565b816008015461248985858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506118d492505050565b146124cb5760405162461bcd60e51b8152602060048201526012602482015271696e636f72726563742063616c6c6461746160701b6044820152606401610c84565b600182015415806124e0575081600101545a10155b61251d5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420656e6f7567682067617360901b6044820152606401610c84565b60068201805461ff0019166101001790558154600190600160a01b900463ffffffff161580159061255c5750825442600160a01b90910463ffffffff16105b15612565575060005b8080156125915750826005015460d25461257f91906156b1565b600284015461258f9060646156b1565b105b1561259a575060005b8080156125ca5750606460d45484600401546125b691906156b1565b6125c091906156d0565b6125c861186e565b105b156125d3575060005b801561264c5760068301805462ff0000191662010000179055604080516020601f870181900481028201810190925285815260009161262d919088908890819084018382808284376000920191909152506140a292505050565b90508061264a5760068401805463ff000000191663010000001790555b505b60068301546040805160ff62010000840481161515825263010000009093049092161515602083015263ffffffff8816917fb4571f7e4e2c2b6e6185e47ab5caa5fe34087299bd49fbae945a4583101ee3f0910160405180910390a25050506126b56001609c55565b505050565b6126c2613cd0565b6126cc60006140cb565b565b6126d6613cd0565b606780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f90cc2f570a6eb594b1580ea3e41247d2d73a55281889e86bd4ec2fc29c7e62d690600090a35050565b6066546001600160a01b031661273c613cc6565b6001600160a01b031614806127575750612757610b94613cc6565b6127735760405162461bcd60e51b8152600401610c8490615652565b8281146127925760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c576127e58585838181106127b2576127b261554b565b90506020020160208101906127c79190614e4b565b8484848181106127d9576127d961554b565b9050602002013561411d565b806127ef81615561565b915050612795565b600054610100900460ff16158080156128175750600054600160ff909116105b806128315750303b158015612831575060005460ff166001145b6128945760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff1916600117905580156128b7576000805461ff0019166101001790555b6128bf613d49565b600080600080600080878060200190518101906128dc9190615742565b95509550955095509550955060006001600160a01b0316846001600160a01b03161415801561291357506001600160a01b03831615155b61294d5760405162461bcd60e51b815260206004820152600b60248201526a0c081859191c881d5cd95960aa1b6044820152606401610c84565b6040518060600160405280602d8152602001615b8d602d9139805161297a9160db91602090910190614c9f565b50612983614156565b61298b614185565b6129ca60405180604001604052806004815260200163566f746560e01b815250604051806040016040528060018152602001600d60fa1b8152506141b4565b6129d38361386f565b606680546001600160a01b0385166001600160a01b03199182168117909255606780549091169091179055612a07826141e5565b60cf80546001600160a01b03199081166001600160a01b038981169190911790925560d0805490911687831617905560da8054640100000000600160c01b031916600160201b87841681029190911791829055612a6b929104166000836001614207565b612aac5760405162461bcd60e51b8152602060048201526012602482015271063616c6c206661696c7572652073657475760741b6044820152606401610c84565b60cf5460408051635c975abb60e01b815290517f916f812584e0b001e8c6ab604fa549cc16c9d0b2f60b17aa0b4ff5eefe3e7725926001600160a01b031691635c975abb9160048083019260209291908290030181865afa158015612b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b3991906154a1565b60d060009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb091906154a1565b60d05460d15460d25460d35460d454604080516306fdde0360e01b8152905163ffffffff600160c01b8804811697600160a01b810490911696959493926001600160a01b03909116916306fdde03916004808201926000929091908290030181865afa158015612c24573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c4c91908101906157df565b60d060009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015612c9f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612cc791908101906157df565b612ccf611f55565b612cd7612260565b604051612cef9c9b9a99989796959493929190615827565b60405180910390a1505050505050612d076001609c55565b8015611123576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610ff4565b6066546001600160a01b0316612d5d613cc6565b6001600160a01b031614612d835760405162461bcd60e51b8152600401610c8490615505565b60d5805461ff001916610100908117918290556040517fb496b9628e839102454d8b483ba451c4be96675009b637273a00e4ab6a59db72926117ea92900460ff161515815260200190565b6066546001600160a01b0316612de2613cc6565b6001600160a01b03161480612dfd5750612dfd610b94613cc6565b612e195760405162461bcd60e51b8152600401610c8490615652565b828114612e385760405162461bcd60e51b8152600401610c8490615524565b60005b8381101561175c57612e8b858583818110612e5857612e5861554b565b9050602002016020810190612e6d9190614e4b565b848484818110612e7f57612e7f61554b565b9050602002013561421f565b80612e9581615561565b915050612e3b565b6066546001600160a01b0316612eb1613cc6565b6001600160a01b031614612ed75760405162461bcd60e51b8152600401610c8490615505565b6000846001600160a01b0316848484604051612ef49291906158ad565b60006040518083038185875af1925050503d8060008114612f31576040519150601f19603f3d011682016040523d82523d6000602084013e612f36565b606091505b505090508061175c5760405162461bcd60e51b815260206004820152601460248201527363616c6c206661696c757265206578656375746560601b6044820152606401610c84565b612f86613d49565b86421115612fd65760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e617475726520657870697265640000006044820152606401610c84565b6001600160a01b038816600090815260d8602052604090205486146130265760405162461bcd60e51b8152602060048201526006602482015265216e6f6e636560d01b6044820152606401610c84565b60007f8698fbcc7273f96a670eb203cb707d8ec171123f24eaf075b1e754b71119e59e60d060009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801561309c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526130c491908101906157df565b6040516020016130d491906158bd565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905263ffffffff871660c082015285151560e082015261010001604051602081830303815290604052805190602001209050600061315182614258565b90506000613161828787876142a6565b90508a6001600160a01b0316816001600160a01b0316146131b85760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b6044820152606401610c84565b6001600160a01b0381166131f85760405162461bcd60e51b815260206004820152600760248201526610b9b4b3b732b960c91b6044820152606401610c84565b6001600160a01b038b16600090815260d8602052604081208054600192906132219084906154ed565b909155506132329050818989613e4e565b50505061323f6001609c55565b5050505050505050565b60608060005b84518110156132cc578160008560008885815181106132705761327061554b565b60200260200101515189868151811061328b5761328b61554b565b60200260200101516040516020016132a8969594939291906158d9565b604051602081830303815290604052915080806132c490615561565b91505061324f565b50806040516024016132de91906151a9565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b6066546001600160a01b0316613324613cc6565b6001600160a01b0316148061333f575061333f610b14613cc6565b61337f5760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b613388816141e5565b6040516001600160a01b038216907f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff90600090a250565b6133c7613cd0565b6001600160a01b0381161561346d576040516301ffc9a760e01b815263736bd41d60e11b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015613421573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344591906154a1565b61346d576040516358b7533f60e11b81526001600160a01b0382166004820152602401610c84565b606580546001600160a01b0319166001600160a01b0383169081179091556040519081527f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa29060200160405180910390a150565b6001600160a01b038116600090815260d6602052604081205460048114806134e95750806005145b806118c2575080600614806118cd575060071492915050565b61350a613d49565b60015b818110156135c7578282613522600184615943565b8181106135315761353161554b565b90506020020160208101906135469190614e4b565b6001600160a01b03168383838181106135615761356161554b565b90506020020160208101906135769190614e4b565b6001600160a01b0316116135b55760405162461bcd60e51b815260206004820152600660248201526510b7b93232b960d11b6044820152606401610c84565b806135bf81615561565b91505061350d565b506136078585858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506142c492505050565b61175c6001609c55565b6066546001600160a01b0316613625613cc6565b6001600160a01b031614806136405750613640610b14613cc6565b6136805760405162461bcd60e51b815260206004820152601160248201527010b130b0b610131010b3b7bb32b93737b960791b6044820152606401610c84565b6000806000806000808680602001905181019061369d919061595a565b949a5092985090965094509250905060648111156136ea5760405162461bcd60e51b815260206004820152600a6024820152696261642071756f72756d60b01b6044820152606401610c84565b606481111561372e5760405162461bcd60e51b815260206004820152601060248201526f3130b21036b4b72932ba32b73a34b7b760811b6044820152606401610c84565b600060d35411801561374a575060d0546001600160a01b031615155b1561379f57613757611f55565b82111561379f5760405162461bcd60e51b815260206004820152601660248201527573706f6e736f72203e20736861726573537570706c7960501b6044820152606401610c84565b63ffffffff8616156137ca5760d0805463ffffffff60a01b1916600160a01b63ffffffff8916021790555b63ffffffff8516156137f55760d0805463ffffffff60c01b1916600160c01b63ffffffff8816021790555b60d184905560d283905560d382905560d48190556040805163ffffffff808916825287166020820152908101859052606081018490526080810183905260a081018290527fc10758ccd7d1dd3330e7bbe13a1a1d6bbb414967932376ee24989bad95edcdc19060c00160405180910390a150505050505050565b613877613cd0565b6001600160a01b0381166138dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b6114b2816140cb565b6001600160a01b038116600090815260d6602052604081205460028114806134e9575080600314806118c2575080600614806118cd575060071492915050565b61392d613d49565b63ffffffff8116600090815260d960205260409020600261394d83613aea565b600781111561395e5761395e615471565b146139955760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60078101546001600160a01b03166139ab613cc6565b6001600160a01b03161480613a53575060d35460d05460078301546001600160a01b0391821691633a46b1a891166139e4600142615943565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381865afa158015613a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a5191906154be565b105b80613a645750613a64610b14613cc6565b613a9f5760405162461bcd60e51b815260206004820152600c60248201526b2163616e63656c6c61626c6560a01b6044820152606401610c84565b60068101805460ff1916600117905560405163ffffffff8316907f8896f24cff41b54acf76c2560861f33cd20fd76c4df0b68a3515c354e4b6c81a90600090a2506114b26001609c55565b63ffffffff818116600090815260d96020908152604080832081516101c08101835281548087168252600160201b8104871694820194909452600160401b8404861681840152600160601b840486166060820152600160801b84048616608080830191909152600160a01b90940490951660a0860152600181015460c0860152600281015460e08601526003810154610100860152600480820154610120870152600582015461014087015282519384019283905293948594909391926101608501929160068501918288855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411613bb75750505092845250505060078201546001600160a01b03166020820152600890910154604090910152805190915063ffffffff16613c255750600092915050565b6101608101515115613c3a5750600392915050565b604081015163ffffffff16613c525750600192915050565b806060015163ffffffff164211613c6c5750600292915050565b806080015163ffffffff164211613c865750600492915050565b8060e0015181610100015110613c9f5750600792915050565b6101608101516020015115613cb75750600692915050565b50600592915050565b50919050565b600061188a614540565b613cd8613cc6565b6001600160a01b0316613cf36033546001600160a01b031690565b6001600160a01b0316146126cc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b6002609c541415613d9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c84565b6002609c55565b6001609c55565b60cf546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f19906044015b600060405180830381600087803b158015613df957600080fd5b505af1158015613e0d573d6000803e3d6000fd5b505050505050565b60cf54604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b63ffffffff8216600090815260d9602052604090206002613e6e84613aea565b6007811115613e7f57613e7f615471565b14613eb65760405162461bcd60e51b815260206004820152600760248201526621766f74696e6760c81b6044820152606401610c84565b60d0548154604051630748d63560e31b81526001600160a01b038781166004830152600160401b90920463ffffffff1660248201526000929190911690633a46b1a890604401602060405180830381865afa158015613f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3d91906154be565b905060008111613f795760405162461bcd60e51b815260206004820152600760248201526610b6b2b6b132b960c91b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff8816845290915290205460ff1615613fdb5760405162461bcd60e51b81526020600482015260056024820152641d9bdd195960da1b6044820152606401610c84565b6001600160a01b038516600090815260d76020908152604080832063ffffffff881684529091528120805460ff1916600117905561401761186e565b9050826004015481111561402d57600483018190555b8315614042576002830180548301905561404d565b600383018054830190555b8315158563ffffffff16876001600160a01b03167f786755545a7e27c12c90cc7f0934514d03fdacfe3684a340b8c4100531e7ecd58560405161409291815260200190565b60405180910390a4505050505050565b60da546000906140c590600160201b90046001600160a01b031682846001614207565b92915050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60d054604051632770a7eb60e21b81526001600160a01b0384811660048301526024820184905290911690639dc29fac90604401613ddf565b600054610100900460ff1661417d5760405162461bcd60e51b8152600401610c84906159b8565b6126cc614574565b600054610100900460ff166141ac5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145ab565b600054610100900460ff166141db5760405162461bcd60e51b8152600401610c84906159b8565b61112382826145d2565b60ce80546001600160a01b0319166001600160a01b0392909216919091179055565b600061421585858585614613565b5095945050505050565b60d0546040516340c10f1960e01b81526001600160a01b03848116600483015260248201849052909116906340c10f1990604401613ddf565b60006140c5614265614812565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006142b78787878761488d565b9150915061421581614951565b60006142ce61186e565b905082156142e7576142e76142e1613cc6565b84613e15565b83156142fe576142fe6142f8613cc6565b8561411d565b60005b82518110156144ec57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031684838151811061433c5761433c61554b565b60200260200101516001600160a01b0316141561436657506067546001600160a01b031631614434565b600084838151811061437a5761437a61554b565b602090810291909101810151606754604080516001600160a01b03928316602480830191909152825180830390910181526044909101825293840180516001600160e01b03166370a0823160e01b179052519116916143d8916158bd565b600060405180830381855afa9150503d8060008114614413576040519150601f19603f3d011682016040523d82523d6000602084013e614418565b606091505b509150508080602001905181019061443091906154be565b9150505b6000838261444289896154ed565b61444c91906156b1565b61445691906156d0565b905080156144d75773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b031685848151811061448e5761448e61554b565b60200260200101516001600160a01b0316146144cd576144c88584815181106144b9576144b961554b565b60200260200101518983614a9f565b6144d7565b6144d78882614b6e565b505080806144e490615561565b915050614301565b5083836144f7613cc6565b6001600160a01b03167fa21c268847f2b8adac3751ed0683330abe9fdd6cc4a7a8fc6787633d4126e0d48886604051614531929190615a03565b60405180910390a45050505050565b60006014361080159061455d575060ce546001600160a01b031633145b1561456f575060131936013560601c90565b503390565b600054610100900460ff1661459b5760405162461bcd60e51b8152600401610c84906159b8565b6126cc6145a6613cc6565b6140cb565b600054610100900460ff16613da35760405162461bcd60e51b8152600401610c84906159b8565b600054610100900460ff166145f95760405162461bcd60e51b8152600401610c84906159b8565b815160209283012081519190920120606891909155606955565b6065546000906060906001600160a01b0316801561478557604051633af85da960e11b81526001600160a01b038216906375f0bb529061466a908a908a908a908a9060009081908190819081903390600401615a73565b600060405180830381600087803b15801561468457600080fd5b505af1158015614698573d6000803e3d6000fd5b5050606754604051635229073f60e01b81526001600160a01b039091169250635229073f91506146d2908a908a908a908a90600401615afd565b6000604051808303816000875af11580156146f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526147199190810190615b3c565b604051631264e26d60e31b815260006004820152821515602482015291945092506001600160a01b03821690639327136890604401600060405180830381600087803b15801561476857600080fd5b505af115801561477c573d6000803e3d6000fd5b50505050614808565b606754604051635229073f60e01b81526001600160a01b0390911690635229073f906147bb908a908a908a908a90600401615afd565b6000604051808303816000875af11580156147da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526148029190810190615b3c565b90935091505b5094509492505050565b600061188a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61484160685490565b6069546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148c45750600090506003614948565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614918573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661494157600060019250925050614948565b9150600090505b94509492505050565b600081600481111561496557614965615471565b141561496e5750565b600181600481111561498257614982615471565b14156149d05760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c84565b60028160048111156149e4576149e4615471565b1415614a325760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b6003816004811115614a4657614a46615471565b14156114b25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b600080614b0785600063a9059cbb8787604051602401614ad49291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506000614bd2565b91509150818015614b30575080511580614b30575080806020019051810190614b3091906154a1565b61175c5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610c84565b6000614b8c8383604051806020016040528060008152506000614bd2565b509050806126b55760405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606401610c84565b60006060614be286868686614613565b9097909650945050505050565b600183019183908215614c715791602002820160005b83821115614c4257835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302614c05565b8015614c6f5782816101000a81549060ff0219169055600101602081600001049283019260010302614c42565b505b50614c7d929150614d13565b5090565b60405180608001604052806004906020820280368337509192915050565b828054614cab9061567c565b90600052602060002090601f016020900481019282614ccd5760008555614c71565b82601f10614ce657805160ff1916838001178555614c71565b82800160010185558215614c71579182015b82811115614c71578251825591602001919060010190614cf8565b5b80821115614c7d5760008155600101614d14565b600060208284031215614d3a57600080fd5b5035919050565b60006101a08201905063ffffffff8f16825263ffffffff8e16602083015263ffffffff8d16604083015263ffffffff8c16606083015263ffffffff8b16608083015263ffffffff8a1660a08301528860c08301528760e0830152866101008301528561012083015284610140830152614dc66101608301856001600160a01b03169052565b826101808301529e9d5050505050505050505050505050565b80151581146114b257600080fd5b60008060408385031215614e0057600080fd5b8235614e0b81614ddf565b91506020830135614e1b81614ddf565b809150509250929050565b6001600160a01b03811681146114b257600080fd5b8035614e4681614e26565b919050565b600060208284031215614e5d57600080fd5b81356118cd81614e26565b63ffffffff811681146114b257600080fd5b600060208284031215614e8c57600080fd5b81356118cd81614e68565b60008083601f840112614ea957600080fd5b5081356001600160401b03811115614ec057600080fd5b6020830191508360208260051b8501011115614edb57600080fd5b9250929050565b60008060008060408587031215614ef857600080fd5b84356001600160401b0380821115614f0f57600080fd5b614f1b88838901614e97565b90965094506020870135915080821115614f3457600080fd5b50614f4187828801614e97565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f8b57614f8b614f4d565b604052919050565b60006001600160401b03821115614fac57614fac614f4d565b50601f01601f191660200190565b600082601f830112614fcb57600080fd5b8135614fde614fd982614f93565b614f63565b818152846020838601011115614ff357600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561502257600080fd5b81356001600160401b0381111561503857600080fd5b61504484828501614fba565b949350505050565b60008083601f84011261505e57600080fd5b5081356001600160401b0381111561507557600080fd5b602083019150836020828501011115614edb57600080fd5b600080600080600080608087890312156150a657600080fd5b86356001600160401b03808211156150bd57600080fd5b6150c98a838b0161504c565b9098509650602089013591506150de82614e68565b90945060408801359350606088013590808211156150fb57600080fd5b5061510889828a0161504c565b979a9699509497509295939492505050565b60808101818360005b60048110156151445781511515835260209283019290910190600101615123565b50505092915050565b60005b83811015615168578181015183820152602001615150565b83811115615177576000848401525b50505050565b6000815180845261519581602086016020860161514d565b601f01601f19169290920160200192915050565b6020815260006118cd602083018461517d565b600080604083850312156151cf57600080fd5b8235614e0b81614e68565b6000806000604084860312156151ef57600080fd5b83356151fa81614e68565b925060208401356001600160401b0381111561521557600080fd5b6152218682870161504c565b9497909650939450505050565b6000806000806060858703121561524457600080fd5b843561524f81614e26565b93506020850135925060408501356001600160401b0381111561527157600080fd5b614f418782880161504c565b600080600080600080600080610100898b03121561529a57600080fd5b88356152a581614e26565b9750602089013596506040890135955060608901356152c381614e68565b945060808901356152d381614ddf565b935060a089013560ff811681146152e957600080fd5b979a969950949793969295929450505060c08201359160e0013590565b6000806040838503121561531957600080fd5b823561532481614e26565b91506020830135614e1b81614e68565b6000806040838503121561534757600080fd5b82356001600160401b038082111561535e57600080fd5b818501915085601f83011261537257600080fd5b813560208282111561538657615386614f4d565b8160051b615395828201614f63565b928352848101820192828101908a8511156153af57600080fd5b83870192505b848310156153eb578235868111156153cd5760008081fd5b6153db8c86838b0101614fba565b83525091830191908301906153b5565b97506153fb915050878201614e3b565b9450505050509250929050565b60008060008060006080868803121561542057600080fd5b853561542b81614e26565b9450602086013593506040860135925060608601356001600160401b0381111561545457600080fd5b61546088828901614e97565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b602081016008831061549b5761549b615471565b91905290565b6000602082840312156154b357600080fd5b81516118cd81614ddf565b6000602082840312156154d057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115615500576155006154d7565b500190565b602080825260059082015264085898585b60da1b604082015260600190565b6020808252600d908201526c2161727261792070617269747960981b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615575576155756154d7565b5060010190565b600063ffffffff80831681811415615596576155966154d7565b6001019392505050565b600063ffffffff8083168185168083038211156155bf576155bf6154d7565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600063ffffffff808c16835260e0602084015261561260e084018b8d6155c8565b818a16604085015288606085015287151560808501528660a085015283810360c08501526156418186886155c8565b9d9c50505050505050505050505050565b60208082526010908201526f10b130b0b610131010b6b0b730b3b2b960811b604082015260600190565b600181811c9082168061569057607f821691505b60208210811415613cc057634e487b7160e01b600052602260045260246000fd5b60008160001904831182151516156156cb576156cb6154d7565b500290565b6000826156ed57634e487b7160e01b600052601260045260246000fd5b500490565b6000615700614fd984614f93565b905082815283838301111561571457600080fd5b6118cd83602083018461514d565b600082601f83011261573357600080fd5b6118cd838351602085016156f2565b60008060008060008060c0878903121561575b57600080fd5b865161576681614e26565b602088015190965061577781614e26565b604088015190955061578881614e26565b606088015190945061579981614e26565b60808801519093506157aa81614e26565b60a08801519092506001600160401b038111156157c657600080fd5b6157d289828a01615722565b9150509295509295509295565b6000602082840312156157f157600080fd5b81516001600160401b0381111561580757600080fd5b8201601f8101841361581857600080fd5b615044848251602084016156f2565b60006101808e151583528d1515602084015263ffffffff808e166040850152808d166060850152508a60808401528960a08401528860c08401528760e08401528061010084015261587a8184018861517d565b905082810361012084015261588f818761517d565b610140840195909552505061016001529a9950505050505050505050565b8183823760009101908152919050565b600082516158cf81846020870161514d565b9190910192915050565b600087516158eb818460208c0161514d565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b166001820152856015820152846035820152835161593381605584016020880161514d565b0160550198975050505050505050565b600082821015615955576159556154d7565b500390565b60008060008060008060c0878903121561597357600080fd5b865161597e81614e68565b602088015190965061598f81614e68565b6040880151606089015160808a015160a0909a0151989b929a5090989097909650945092505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b81811015615a51578551851683529483019491830191600101615a33565b509098975050505050505050565b60028110615a6f57615a6f615471565b9052565b6001600160a01b038b81168252602082018b905261016060408301819052600091615aa08483018d61517d565b9150615aaf606085018c615a5f565b608084019990995260a08301979097525060c081019490945291851660e084015284166101008301528183036101208301526000835290921661014090920191909152602001949350505050565b60018060a01b0385168152836020820152608060408201526000615b24608083018561517d565b9050615b336060830184615a5f565b95945050505050565b60008060408385031215615b4f57600080fd5b8251615b5a81614ddf565b60208401519092506001600160401b03811115615b7657600080fd5b615b8285828601615722565b915050925092905056fe322e322e352b6f70656e67736e2e70617961626c65776974686261616c2e6972656c6179726563697069656e74a2646970667358221220e7f7a8af70f47c4c0a43ae70fdb50ef5f9643adc80e4e50e8e0c3ddc18ff5f7f64736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": { + "burnLoot(address[],uint256[])": { + "params": { + "amount": "Array of amounts to burn", + "from": "Array of addresses to lose loot" + } + }, + "burnShares(address[],uint256[])": { + "params": { + "amount": "Array of amounts to burn", + "from": "Array of addresses to lose shares" + } + }, + "cancelProposal(uint32)": { + "details": "Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold", + "params": { + "id": "Number of proposal in `proposals` mapping to process for execution." + } + }, + "executeAsBaal(address,uint256,bytes)": { + "details": "Function to Execute arbitrary code as baal - useful if funds are accidentally sent here", + "params": { + "_data": "arbitrary transaction data", + "_to": "address to call", + "_value": "value to include in wei" + } + }, + "getProposalStatus(uint32)": { + "params": { + "id": "Number of proposal in proposals" + }, + "returns": { + "_0": "[cancelled, processed, passed, actionFailed]" + } + }, + "isAdmin(address)": { + "params": { + "shaman": "Address attempting to execute admin permissioned functions" + } + }, + "isGovernor(address)": { + "params": { + "shaman": "Address attempting to execute governor permissioned functions" + } + }, + "isManager(address)": { + "params": { + "shaman": "Address attempting to execute manager permissioned functions" + } + }, + "mintLoot(address[],uint256[])": { + "params": { + "amount": "Array of amounts to mint", + "to": "Array of addresses to mint loot" + } + }, + "mintShares(address[],uint256[])": { + "params": { + "amount": "Array of amounts to mint", + "to": "Array of addresses to receive shares" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "processProposal(uint32,bytes)": { + "details": "Proposal must have succeeded, not been processed, not expired, retention threshold must be met", + "params": { + "id": "Number of proposal in `proposals` mapping to process for execution.", + "proposalData": "Packed multisend data to execute via Gnosis multisend library" + } + }, + "ragequit(address,uint256,uint256,address[])": { + "params": { + "lootToBurn": "Baal pure economic weight to burn.", + "sharesToBurn": "Baal voting weight to burn.", + "to": "Account that receives 'fair share'.", + "tokens": "Array of tokens to include in rage quit calculation" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setAdminConfig(bool,bool)": { + "params": { + "pauseLoot": "Turn loot transfers on or off", + "pauseShares": "Turn share transfers on or off" + } + }, + "setAvatar(address)": { + "details": "Sets the avatar to a new avatar (`newAvatar`)." + }, + "setGovernanceConfig(bytes)": { + "params": { + "_governanceConfig": "Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound" + } + }, + "setGuard(address)": { + "details": "Set a guard that checks transactions before execution.", + "params": { + "_guard": "The address of the guard to be used or the 0 address to disable the guard." + } + }, + "setShamans(address[],uint256[])": { + "params": { + "_permissions": "Permission level of each shaman in _shamans", + "_shamans": "Addresses of shaman contracts" + } + }, + "setTarget(address)": { + "details": "Sets the target to a new target (`newTarget`)." + }, + "setTrustedForwarder(address)": { + "params": { + "_trustedForwarderAddress": "Trusted forwarder's address" + } + }, + "setUp(bytes)": { + "params": { + "_initializationParams": "Encoded setup information." + } + }, + "sponsorProposal(uint32)": { + "params": { + "id": "Number of proposal in `proposals` mapping to sponsor." + } + }, + "state(uint32)": { + "params": { + "id": "Number of proposal in proposals" + }, + "returns": { + "_0": "Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed \\-> Cancelled \\-> Defeated" + } + }, + "submitProposal(bytes,uint32,uint256,string)": { + "params": { + "details": "Context for proposal.", + "proposalData": "Multisend encoded transactions or proposal data" + }, + "returns": { + "_0": "proposal Count for submitted proposal." + } + }, + "submitVote(uint32,bool)": { + "params": { + "approved": "If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.", + "id": "Number of proposal in `proposals` mapping to cast vote on." + } + }, + "submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)": { + "params": { + "approved": "If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.", + "expiry": "Expiration of signature.", + "id": "Number of proposal in `proposals` mapping to cast vote on.", + "r": "r in signature", + "s": "s in signature", + "v": "v in signature", + "voter": "Address of member who submitted vote." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "Baal ';_;'.", + "version": 1 + }, + "userdoc": { + "errors": { + "NotIERC165Compliant(address)": [ + { + "notice": "`guard_` does not implement IERC165." + } + ] + }, + "kind": "user", + "methods": { + "burnLoot(address[],uint256[])": { + "notice": "Baal-or-manager-only function to burn loot." + }, + "burnShares(address[],uint256[])": { + "notice": "Baal-or-manager-only function to burn shares." + }, + "cancelProposal(uint32)": { + "notice": "Cancel proposal prior to execution" + }, + "executeAsBaal(address,uint256,bytes)": { + "notice": "Can only be called by the avatar which means this can only be called if passed by another proposal or by a delegated signer on the Safe" + }, + "getProposalStatus(uint32)": { + "notice": "Helper to get recorded proposal flags" + }, + "hashOperation(bytes)": { + "notice": "Returns the keccak256 hash of calldata" + }, + "isAdmin(address)": { + "notice": "Helper to check if shaman permission contains admin capabilities" + }, + "isGovernor(address)": { + "notice": "Helper to check if shaman permission contains governor capabilities" + }, + "isManager(address)": { + "notice": "Helper to check if shaman permission contains manager capabilities" + }, + "isTrustedForwarder(address)": { + "notice": "return if the forwarder is trusted to forward relayed transactions to us. the forwarder is required to verify the sender's signature, and verify the call is not a replay." + }, + "lockAdmin()": { + "notice": "Lock admin so setShamans cannot be called with admin changes" + }, + "lockGovernor()": { + "notice": "Lock governor so setShamans cannot be called with governor changes" + }, + "lockManager()": { + "notice": "Lock manager so setShamans cannot be called with manager changes" + }, + "mintLoot(address[],uint256[])": { + "notice": "Baal-or-manager-only function to mint loot." + }, + "mintShares(address[],uint256[])": { + "notice": "Baal-or-manager-only function to mint shares." + }, + "processProposal(uint32,bytes)": { + "notice": "Process `proposal` & execute internal functions." + }, + "ragequit(address,uint256,uint256,address[])": { + "notice": "Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`" + }, + "setAdminConfig(bool,bool)": { + "notice": "Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token" + }, + "setAvatar(address)": { + "notice": "Can only be called by the current owner." + }, + "setGovernanceConfig(bytes)": { + "notice": "Baal-or-governance-only function to change periods." + }, + "setShamans(address[],uint256[])": { + "notice": "Baal-only function to set shaman status." + }, + "setTarget(address)": { + "notice": "Can only be called by the current owner." + }, + "setTrustedForwarder(address)": { + "notice": "Baal-or-governance only function to set trusted forwarder for meta-transactions." + }, + "setUp(bytes)": { + "notice": "Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights." + }, + "sponsorProposal(uint32)": { + "notice": "Sponsor proposal to Baal `members` for approval within voting period." + }, + "state(uint32)": { + "notice": "State helper to determine proposal state" + }, + "submitProposal(bytes,uint32,uint256,string)": { + "notice": "Submit proposal to Baal `members` for approval within given voting period." + }, + "submitVote(uint32,bool)": { + "notice": "Submit vote - proposal must exist & voting period must not have ended." + }, + "submitVoteWithSig(address,uint256,uint256,uint32,bool,uint8,bytes32,bytes32)": { + "notice": "Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended." + }, + "totalLoot()": { + "notice": "Helper to check total supply of child loot contract" + }, + "totalShares()": { + "notice": "Helper to check total supply of child shares contract" + }, + "totalSupply()": { + "notice": "Helper to check total supply of loot and shares" + } + }, + "notice": "Flexible guild contract inspired by Moloch DAO framework.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/Baal.sol:Baal", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/Baal.sol:Baal", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/Baal.sol:Baal", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3614, + "contract": "contracts/Baal.sol:Baal", + "label": "guard", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 3191, + "contract": "contracts/Baal.sol:Baal", + "label": "avatar", + "offset": 0, + "slot": "102", + "type": "t_address" + }, + { + "astId": 3194, + "contract": "contracts/Baal.sol:Baal", + "label": "target", + "offset": 0, + "slot": "103", + "type": "t_address" + }, + { + "astId": 7403, + "contract": "contracts/Baal.sol:Baal", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "104", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/Baal.sol:Baal", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "105", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "106", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4893, + "contract": "contracts/Baal.sol:Baal", + "label": "_status", + "offset": 0, + "slot": "156", + "type": "t_uint256" + }, + { + "astId": 4951, + "contract": "contracts/Baal.sol:Baal", + "label": "__gap", + "offset": 0, + "slot": "157", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3804, + "contract": "contracts/Baal.sol:Baal", + "label": "_trustedForwarder", + "offset": 0, + "slot": "206", + "type": "t_address" + }, + { + "astId": 10058, + "contract": "contracts/Baal.sol:Baal", + "label": "lootToken", + "offset": 0, + "slot": "207", + "type": "t_contract(IBaalToken)14080" + }, + { + "astId": 10061, + "contract": "contracts/Baal.sol:Baal", + "label": "sharesToken", + "offset": 0, + "slot": "208", + "type": "t_contract(IBaalToken)14080" + }, + { + "astId": 10066, + "contract": "contracts/Baal.sol:Baal", + "label": "votingPeriod", + "offset": 20, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10068, + "contract": "contracts/Baal.sol:Baal", + "label": "gracePeriod", + "offset": 24, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10070, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalCount", + "offset": 28, + "slot": "208", + "type": "t_uint32" + }, + { + "astId": 10072, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalOffering", + "offset": 0, + "slot": "209", + "type": "t_uint256" + }, + { + "astId": 10074, + "contract": "contracts/Baal.sol:Baal", + "label": "quorumPercent", + "offset": 0, + "slot": "210", + "type": "t_uint256" + }, + { + "astId": 10076, + "contract": "contracts/Baal.sol:Baal", + "label": "sponsorThreshold", + "offset": 0, + "slot": "211", + "type": "t_uint256" + }, + { + "astId": 10078, + "contract": "contracts/Baal.sol:Baal", + "label": "minRetentionPercent", + "offset": 0, + "slot": "212", + "type": "t_uint256" + }, + { + "astId": 10080, + "contract": "contracts/Baal.sol:Baal", + "label": "adminLock", + "offset": 0, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10082, + "contract": "contracts/Baal.sol:Baal", + "label": "managerLock", + "offset": 1, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10084, + "contract": "contracts/Baal.sol:Baal", + "label": "governorLock", + "offset": 2, + "slot": "213", + "type": "t_bool" + }, + { + "astId": 10088, + "contract": "contracts/Baal.sol:Baal", + "label": "shamans", + "offset": 0, + "slot": "214", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10094, + "contract": "contracts/Baal.sol:Baal", + "label": "memberVoted", + "offset": 0, + "slot": "215", + "type": "t_mapping(t_address,t_mapping(t_uint32,t_bool))" + }, + { + "astId": 10098, + "contract": "contracts/Baal.sol:Baal", + "label": "votingNonces", + "offset": 0, + "slot": "216", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10103, + "contract": "contracts/Baal.sol:Baal", + "label": "proposals", + "offset": 0, + "slot": "217", + "type": "t_mapping(t_uint256,t_struct(Proposal)10146_storage)" + }, + { + "astId": 10105, + "contract": "contracts/Baal.sol:Baal", + "label": "latestSponsoredProposalId", + "offset": 0, + "slot": "218", + "type": "t_uint32" + }, + { + "astId": 10107, + "contract": "contracts/Baal.sol:Baal", + "label": "multisendLibrary", + "offset": 4, + "slot": "218", + "type": "t_address" + }, + { + "astId": 10110, + "contract": "contracts/Baal.sol:Baal", + "label": "versionRecipient", + "offset": 0, + "slot": "219", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bool)4_storage": { + "base": "t_bool", + "encoding": "inplace", + "label": "bool[4]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IBaalToken)14080": { + "encoding": "inplace", + "label": "contract IBaalToken", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint32,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint32 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint32,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_struct(Proposal)10146_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Baal.Proposal)", + "numberOfBytes": "32", + "value": "t_struct(Proposal)10146_storage" + }, + "t_mapping(t_uint32,t_bool)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Proposal)10146_storage": { + "encoding": "inplace", + "label": "struct Baal.Proposal", + "members": [ + { + "astId": 10117, + "contract": "contracts/Baal.sol:Baal", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10119, + "contract": "contracts/Baal.sol:Baal", + "label": "prevProposalId", + "offset": 4, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10121, + "contract": "contracts/Baal.sol:Baal", + "label": "votingStarts", + "offset": 8, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10123, + "contract": "contracts/Baal.sol:Baal", + "label": "votingEnds", + "offset": 12, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10125, + "contract": "contracts/Baal.sol:Baal", + "label": "graceEnds", + "offset": 16, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10127, + "contract": "contracts/Baal.sol:Baal", + "label": "expiration", + "offset": 20, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 10129, + "contract": "contracts/Baal.sol:Baal", + "label": "baalGas", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 10131, + "contract": "contracts/Baal.sol:Baal", + "label": "yesVotes", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 10133, + "contract": "contracts/Baal.sol:Baal", + "label": "noVotes", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 10135, + "contract": "contracts/Baal.sol:Baal", + "label": "maxTotalSharesAndLootAtVote", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 10137, + "contract": "contracts/Baal.sol:Baal", + "label": "maxTotalSharesAtSponsor", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 10141, + "contract": "contracts/Baal.sol:Baal", + "label": "status", + "offset": 0, + "slot": "6", + "type": "t_array(t_bool)4_storage" + }, + { + "astId": 10143, + "contract": "contracts/Baal.sol:Baal", + "label": "sponsor", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 10145, + "contract": "contracts/Baal.sol:Baal", + "label": "proposalDataHash", + "offset": 0, + "slot": "8", + "type": "t_bytes32" + } + ], + "numberOfBytes": "288" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAdvTokenSummoner.json b/deployments/sepolia/BaalAdvTokenSummoner.json new file mode 100644 index 0000000..10eed46 --- /dev/null +++ b/deployments/sepolia/BaalAdvTokenSummoner.json @@ -0,0 +1,375 @@ +{ + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_safeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_forwarderAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initializationMintParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "initializationTokenParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "postInitializationActions", + "type": "bytes[]" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "transactionIndex": 31, + "gasUsed": "333488", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000004000000080002000000000000000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000000000002000000000020000000200000000000000000402000000000000000000200000000000000000000", + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e", + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "logs": [ + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004aff5c9eced3a7a6d3b7039fca520a5674a981ea" + ], + "data": "0x", + "logIndex": 18, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + }, + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + }, + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 20, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + } + ], + "blockNumber": 4816783, + "cumulativeGasUsed": "2058194", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAdvTokenSummoner_Implementation.json b/deployments/sepolia/BaalAdvTokenSummoner_Implementation.json new file mode 100644 index 0000000..cac4e93 --- /dev/null +++ b/deployments/sepolia/BaalAdvTokenSummoner_Implementation.json @@ -0,0 +1,455 @@ +{ + "address": "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_safeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_forwarderAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initializationMintParams", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "initializationTokenParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "postInitializationActions", + "type": "bytes[]" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [], + "stateMutability": "nonpayable", + "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" + } + ], + "transactionHash": "0xf6db8eab8cd6f3dcb333cb7214503d488d88872f178b94b9668ed2e407049c46", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "transactionIndex": 2, + "gasUsed": "2167438", + "logsBloom": "0x00000040000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdacea96f438681e60e31b577e0864ab78d6b02d2779ad20174838b71229de3d3", + "transactionHash": "0xf6db8eab8cd6f3dcb333cb7214503d488d88872f178b94b9668ed2e407049c46", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 4816782, + "transactionHash": "0xf6db8eab8cd6f3dcb333cb7214503d488d88872f178b94b9668ed2e407049c46", + "address": "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 0, + "blockHash": "0xdacea96f438681e60e31b577e0864ab78d6b02d2779ad20174838b71229de3d3" + } + ], + "blockNumber": 4816782, + "cumulativeGasUsed": "2937166", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"name\":\"DeployBaalTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"summoner\",\"type\":\"address\"}],\"name\":\"setSummoner\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_baalSummoner\",\"outputs\":[{\"internalType\":\"contract IBaalSummoner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baalSummoner\",\"type\":\"address\"}],\"name\":\"setSummonerAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_safeAddr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_forwarderAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"initializationMintParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initializationTokenParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"postInitializationActions\",\"type\":\"bytes[]\"}],\"name\":\"summonBaalFromReferrer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setSummonerAddr(address)\":{\"details\":\"Sets the address of the BaalSummoner contract\",\"params\":{\"baalSummoner\":\"The address of the BaalSummoner contract\"}},\"summonBaalFromReferrer(address,address,uint256,bytes,bytes,bytes[])\":{\"details\":\"Summon a new Baal contract with a new set of tokens\",\"params\":{\"_forwarderAddr\":\"The address of the forwarder to be used, 0x0 if not set\",\"_safeAddr\":\"The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\",\"_saltNonce\":\"The salt nonce to be used for the Safe contract\",\"initializationMintParams\":\"The parameters for minting the tokens\",\"initializationTokenParams\":\"The parameters for deploying the tokens\",\"postInitializationActions\":\"The actions to be performed after the initialization\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/higherOrderFactories/BaalAdvTokenSummoner.sol\":\"BaalAdvTokenSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\\n/// @author Richard Meissner - \\ninterface IProxy {\\n function masterCopy() external view returns (address);\\n}\\n\\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafeProxy {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\\n address internal singleton;\\n\\n /// @dev Constructor function sets address of singleton contract.\\n /// @param _singleton Singleton address.\\n constructor(address _singleton) {\\n require(_singleton != address(0), \\\"Invalid singleton address provided\\\");\\n singleton = _singleton;\\n }\\n\\n /// @dev Fallback function forwards all transactions and returns all received return data.\\n fallback() external payable {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\\n // 0xa619486e == keccak(\\\"masterCopy()\\\"). The value is right padded to 32-bytes with 0s\\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\\n mstore(0, _singleton)\\n return(0, 0x20)\\n }\\n calldatacopy(0, 0, calldatasize())\\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if eq(success, 0) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3bfdd453d9f896f7029d15bcafd11886957b320ad1764309d9f74fa059715249\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./GnosisSafeProxy.sol\\\";\\nimport \\\"./IProxyCreationCallback.sol\\\";\\n\\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n/// @author Stefan George - \\ncontract GnosisSafeProxyFactory {\\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param singleton Address of singleton contract.\\n /// @param data Payload for message call sent to new proxy contract.\\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\\n proxy = new GnosisSafeProxy(singleton);\\n if (data.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, singleton);\\n }\\n\\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\\n function proxyRuntimeCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).runtimeCode;\\n }\\n\\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\\n function proxyCreationCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).creationCode;\\n }\\n\\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\\n /// This method is only meant as an utility to be called from other methods\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function deployProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) internal returns (GnosisSafeProxy proxy) {\\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\\n }\\n require(address(proxy) != address(0), \\\"Create2 call failed\\\");\\n }\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function createProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n if (initializer.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, _singleton);\\n }\\n\\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\\n function createProxyWithCallback(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce,\\n IProxyCreationCallback callback\\n ) public returns (GnosisSafeProxy proxy) {\\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\\n }\\n\\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function calculateCreateProxyWithNonceAddress(\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n revert(string(abi.encodePacked(proxy)));\\n }\\n}\\n\",\"keccak256\":\"0x187c6f84c71b432da6721c1b81cebfbb9c37c0cc15ebd8de5a14ff7ec6db2d9e\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"./GnosisSafeProxy.sol\\\";\\n\\ninterface IProxyCreationCallback {\\n function proxyCreated(\\n GnosisSafeProxy proxy,\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external;\\n}\\n\",\"keccak256\":\"0x51a9ce914a6a943651c803541e44218a7ed0a2f98a94d55df66b173b5a11e365\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\ncontract ModuleProxyFactory {\\n event ModuleProxyCreation(\\n address indexed proxy,\\n address indexed masterCopy\\n );\\n\\n /// `target` can not be zero.\\n error ZeroAddress(address target);\\n\\n /// `target` has no code deployed.\\n error TargetHasNoCode(address target);\\n\\n /// `address_` is already taken.\\n error TakenAddress(address address_);\\n\\n /// @notice Initialization failed.\\n error FailedInitialization();\\n\\n function createProxy(address target, bytes32 salt)\\n internal\\n returns (address result)\\n {\\n if (address(target) == address(0)) revert ZeroAddress(target);\\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\\n bytes memory deployment = abi.encodePacked(\\n hex\\\"602d8060093d393df3363d3d373d3d3d363d73\\\",\\n target,\\n hex\\\"5af43d82803e903d91602b57fd5bf3\\\"\\n );\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\\n }\\n if (result == address(0)) revert TakenAddress(result);\\n }\\n\\n function deployModule(\\n address masterCopy,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (address proxy) {\\n proxy = createProxy(\\n masterCopy,\\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\\n );\\n (bool success, ) = proxy.call(initializer);\\n if (!success) revert FailedInitialization();\\n\\n emit ModuleProxyCreation(proxy, masterCopy);\\n }\\n}\\n\",\"keccak256\":\"0x40a3eb64fec76f1f77656a77b4c469b299f2d8b0523ed0f207d3879455c06a70\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/higherOrderFactories/BaalAdvTokenSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"../Baal.sol\\\";\\nimport \\\"../interfaces/IBaalSummoner.sol\\\";\\n\\ncontract BaalAdvTokenSummoner is\\n Initializable,\\n OwnableUpgradeable,\\n UUPSUpgradeable\\n{\\n IBaalSummoner public _baalSummoner;\\n\\n event setSummoner(address summoner);\\n\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function initialize() public initializer {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n /**\\n * @dev Sets the address of the BaalSummoner contract\\n * @param baalSummoner The address of the BaalSummoner contract\\n */\\n function setSummonerAddr(address baalSummoner) public onlyOwner {\\n require(baalSummoner != address(0), \\\"zero address\\\");\\n _baalSummoner = IBaalSummoner(baalSummoner);\\n emit setSummoner(baalSummoner);\\n }\\n\\n /**\\n * @dev Summon a new Baal contract with a new set of tokens\\n * @param _safeAddr The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\\n * @param _forwarderAddr The address of the forwarder to be used, 0x0 if not set\\n * @param _saltNonce The salt nonce to be used for the Safe contract\\n * @param initializationMintParams The parameters for minting the tokens\\n * @param initializationTokenParams The parameters for deploying the tokens\\n * @param postInitializationActions The actions to be performed after the initialization\\n */\\n function summonBaalFromReferrer(\\n address _safeAddr,\\n address _forwarderAddr,\\n uint256 _saltNonce,\\n bytes calldata initializationMintParams,\\n bytes calldata initializationTokenParams,\\n bytes[] calldata postInitializationActions\\n ) external {\\n // summon tokens\\n (address _lootToken, address _sharesToken) = deployTokens(\\n initializationTokenParams\\n );\\n\\n // mint shares loot tokens\\n mintTokens(initializationMintParams, _lootToken, _sharesToken);\\n\\n // summon baal with new tokens\\n address _baal = _baalSummoner.summonBaalFromReferrer(\\n abi.encode(\\n IBaalToken(_sharesToken).name(), \\n IBaalToken(_sharesToken).symbol(),\\n _safeAddr,\\n _forwarderAddr,\\n _lootToken,\\n _sharesToken\\n ),\\n postInitializationActions,\\n _saltNonce,\\n bytes32(bytes(\\\"DHAdvTokenSummoner\\\")) // referrer\\n );\\n\\n // change token ownership to baal\\n IBaalToken(_lootToken).transferOwnership(address(_baal));\\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\\n }\\n\\n /**\\n * @dev mintTokens\\n * @param initializationTokens The parameters for minting the tokens\\n * @param _lootToken The loot token address\\n * @param _sharesToken The shares token address\\n */\\n function mintTokens(\\n bytes calldata initializationTokens,\\n address _lootToken,\\n address _sharesToken\\n ) internal {\\n (\\n address[] memory summoners, // The address to mint initial tokens to\\n uint256[] memory summonerShares, // The amount of shares to mint\\n uint256[] memory summonerLoot // The amount of loot to mint\\n ) = abi.decode(initializationTokens, (address[], uint256[], uint256[]));\\n\\n require(\\n summoners.length == summonerShares.length &&\\n summoners.length == summonerLoot.length,\\n \\\"!array parity\\\"\\n ); /*check array lengths match*/\\n\\n for (uint256 i = 0; i < summoners.length; i++) {\\n if (summonerLoot[i] > 0) {\\n IBaalToken(_lootToken).mint(\\n summoners[i],\\n summonerLoot[i]\\n ); /*grant `to` `amount` `loot`*/\\n }\\n if (summonerShares[i] > 0) {\\n IBaalToken(_sharesToken).mint(\\n summoners[i],\\n summonerShares[i]\\n ); /*grant `to` `amount` `shares`*/\\n }\\n }\\n }\\n\\n /**\\n * @dev deployTokens\\n * @param initializationParams The parameters for deploying the tokens\\n */\\n function deployTokens(\\n bytes calldata initializationParams\\n ) internal returns (address lootToken, address sharesToken) {\\n (\\n string\\n memory _name /*_name Name for erc20 `shares` accounting, empty if token */,\\n string\\n memory _symbol /*_symbol Symbol for erc20 `shares` accounting, empty if token*/,\\n string\\n memory _lootName /* name for erc20 `loot` accounting, empty if token */,\\n string\\n memory _lootSymbol /* symbol for erc20 `loot` accounting, empty if token*/,\\n bool _transferableShares /* if shares is transferable */,\\n bool _transferableLoot /* if loot is transferable */\\n ) = abi.decode(\\n initializationParams,\\n (string, string, string, string, bool, bool)\\n );\\n\\n address lootSingleton = _baalSummoner.lootSingleton();\\n address sharesSingleton = _baalSummoner.sharesSingleton();\\n\\n lootToken = address(\\n new ERC1967Proxy(\\n lootSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(lootSingleton).setUp.selector,\\n _lootName,\\n _lootSymbol\\n )\\n )\\n );\\n\\n sharesToken = address(\\n new ERC1967Proxy(\\n sharesSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(sharesSingleton).setUp.selector,\\n _name,\\n _symbol\\n )\\n )\\n );\\n if (!_transferableShares) {\\n IBaalToken(sharesToken).pause();\\n }\\n if (!_transferableLoot) {\\n IBaalToken(lootToken).pause();\\n }\\n\\n emit DeployBaalTokens(lootToken, sharesToken);\\n }\\n\\n function _authorizeUpgrade(\\n address newImplementation\\n ) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x006b6737392584aee27cae0cad838ca0d07004a77b10600884a3813318775807\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalSummoner.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalSummoner {\\n event AdminChanged(address previousAdmin, address newAdmin);\\n event BeaconUpgraded(address indexed beacon);\\n event DaoReferral(bytes32 referrer, address daoAddress);\\n event DeployBaalSafe(address baalSafe, address moduleAddr);\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n event Initialized(uint8 version);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event SetAddrsVersion(uint256 version);\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n event Upgraded(address indexed implementation);\\n\\n function setAddrs(\\n address _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) external;\\n\\n function initialize() external;\\n\\n function transferOwnership(address newOwner) external;\\n function upgradeTo(address newImplementation) external;\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\\n function renounceOwnership() external;\\n\\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\\n external\\n returns (address);\\n function summonBaalFromReferrer(\\n bytes memory initializationParams,\\n bytes[] memory initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address);\\n\\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\\n function deployTokens(string memory _name, string memory _symbol)\\n external\\n returns (address lootToken, address sharesToken);\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend);\\n function addrsVersion() external view returns (uint256);\\n function gnosisFallbackLibrary() external view returns (address);\\n function gnosisMultisendLibrary() external view returns (address);\\n function gnosisSingleton() external view returns (address);\\n function lootSingleton() external view returns (address);\\n function sharesSingleton() external view returns (address);\\n function owner() external view returns (address);\\n function proxiableUUID() external view returns (bytes32);\\n function template() external view returns (address);\\n}\\n\",\"keccak256\":\"0xc5eb34a9c49792956ed8574ce0fae742c3ea655101a890965caf7e7983e1be79\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b60805234801561001757600080fd5b50610020610025565b6100e5565b600054610100900460ff16156100915760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100e3576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c6125de61011f600039600081816104ec01528181610538015281816105e10152818161062401526106c001526125de6000f3fe6080604052600436106200009d5760003560e01c8063715018a61162000060578063715018a6146200016b5780638129fc1c14620001835780638da5cb5b146200019b578063bb6decc814620001bb578063f2fde38b14620001e057600080fd5b806314b630f914620000a25780631f1bb0ef14620000e15780633659cfe614620001085780634f1ef286146200012d57806352d1902d1462000144575b600080fd5b348015620000af57600080fd5b5060c954620000c4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000ee57600080fd5b50620001066200010036600462001621565b62000205565b005b3480156200011557600080fd5b506200010662000127366004620015e1565b620004e1565b620001066200013e36600462001728565b620005d6565b3480156200015157600080fd5b506200015c620006b3565b604051908152602001620000d8565b3480156200017857600080fd5b506200010662000769565b3480156200019057600080fd5b506200010662000781565b348015620001a857600080fd5b506033546001600160a01b0316620000c4565b348015620001c857600080fd5b5062000106620001da366004620015e1565b620008a5565b348015620001ed57600080fd5b5062000106620001ff366004620015e1565b62000945565b600080620002148686620009c1565b91509150620002268888848462000d1e565b600060c960009054906101000a90046001600160a01b03166001600160a01b031663209f3695836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200028657600080fd5b505afa1580156200029b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002c59190810190620018ab565b846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002ff57600080fd5b505afa15801562000314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200033e9190810190620018ab565b8f8f8888604051602001620003599695949392919062001ba3565b60408051601f198184030181528282019091526012825271222420b23b2a37b5b2b729bab6b6b7b732b960711b602083015290889088908f906200039d9062001d69565b6040518663ffffffff1660e01b8152600401620003bf95949392919062001aa3565b602060405180830381600087803b158015620003da57600080fd5b505af1158015620003ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000415919062001601565b60405163f2fde38b60e01b81526001600160a01b0380831660048301529192509084169063f2fde38b90602401600060405180830381600087803b1580156200045d57600080fd5b505af115801562000472573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b158015620004ba57600080fd5b505af1158015620004cf573d6000803e3d6000fd5b50505050505050505050505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005365760405162461bcd60e51b81526004016200052d9062001c00565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200058160008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620005aa5760405162461bcd60e51b81526004016200052d9062001c4c565b620005b58162000f5f565b60408051600080825260208201909252620005d39183919062000f69565b50565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620006225760405162461bcd60e51b81526004016200052d9062001c00565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200066d60008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620006965760405162461bcd60e51b81526004016200052d9062001c4c565b620006a18262000f5f565b620006af8282600162000f69565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007555760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016200052d565b506000805160206200256283398151915290565b62000773620010f6565b6200077f600062001152565b565b600054610100900460ff1615808015620007a25750600054600160ff909116105b80620007be5750303b158015620007be575060005460ff166001145b620008235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200052d565b6000805460ff19166001179055801562000847576000805461ff0019166101001790555b62000851620011a4565b6200085b620011d8565b8015620005d3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b620008af620010f6565b6001600160a01b038116620008f65760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016200052d565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016200089a565b6200094f620010f6565b6001600160a01b038116620009b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200052d565b620005d38162001152565b600080808080808080620009d8898b018b62001922565b955095509550955095509550600060c960009054906101000a90046001600160a01b03166001600160a01b031663d9118ce76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a3557600080fd5b505afa15801562000a4a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a70919062001601565b9050600060c960009054906101000a90046001600160a01b03166001600160a01b031663a23466186040518163ffffffff1660e01b815260040160206040518083038186803b15801562000ac357600080fd5b505afa15801562000ad8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000afe919062001601565b90508163562d190d60e01b878760405160240162000b1e92919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b5d9062001497565b62000b6a92919062001a75565b604051809103906000f08015801562000b87573d6000803e3d6000fd5b5099508063562d190d60e01b898960405160240162000ba892919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000be79062001497565b62000bf492919062001a75565b604051809103906000f08015801562000c11573d6000803e3d6000fd5b5098508362000c7057886001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000c5657600080fd5b505af115801562000c6b573d6000803e3d6000fd5b505050505b8262000ccc57896001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000cb257600080fd5b505af115801562000cc7573d6000803e3d6000fd5b505050505b604080516001600160a01b03808d1682528b1660208201527ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a150505050505050509250929050565b6000808062000d308688018862001793565b9250925092508151835114801562000d49575080518351145b62000d875760405162461bcd60e51b815260206004820152600d60248201526c2161727261792070617269747960981b60448201526064016200052d565b60005b835181101562000f5557600082828151811062000dab5762000dab62001dea565b6020026020010151111562000e6a57856001600160a01b03166340c10f1985838151811062000dde5762000dde62001dea565b602002602001015184848151811062000dfb5762000dfb62001dea565b60200260200101516040518363ffffffff1660e01b815260040162000e359291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000e5057600080fd5b505af115801562000e65573d6000803e3d6000fd5b505050505b600083828151811062000e815762000e8162001dea565b6020026020010151111562000f4057846001600160a01b03166340c10f1985838151811062000eb45762000eb462001dea565b602002602001015185848151811062000ed15762000ed162001dea565b60200260200101516040518363ffffffff1660e01b815260040162000f0b9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000f2657600080fd5b505af115801562000f3b573d6000803e3d6000fd5b505050505b8062000f4c8162001dc0565b91505062000d8a565b5050505050505050565b620005d3620010f6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000fa45762000f9f8362001202565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000fde57600080fd5b505afa92505050801562001011575060408051601f3d908101601f191682019092526200100e9181019062001891565b60015b620010765760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016200052d565b600080516020620025628339815191528114620010e85760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016200052d565b5062000f9f838383620012a1565b6033546001600160a01b031633146200077f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200052d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620011ce5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f620012d2565b600054610100900460ff166200077f5760405162461bcd60e51b81526004016200052d9062001c98565b6001600160a01b0381163b620012715760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200052d565b6000805160206200256283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620012ac8362001307565b600082511180620012ba5750805b1562000f9f57620012cc838362001349565b50505050565b600054610100900460ff16620012fc5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f3362001152565b620013128162001202565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620013b35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200052d565b600080846001600160a01b031684604051620013d0919062001a57565b600060405180830381855af49150503d80600081146200140d576040519150601f19603f3d011682016040523d82523d6000602084013e62001412565b606091505b50915091506200143d8282604051806060016040528060278152602001620025826027913962001446565b95945050505050565b606083156200145757508162001463565b6200146383836200146a565b9392505050565b8151156200147b5781518083602001fd5b8060405162461bcd60e51b81526004016200052d919062001b65565b6107358062001e2d83390190565b6000620014bc620014b68462001d3e565b62001ce3565b9050828152838383011115620014d157600080fd5b828260208301376000602084830101529392505050565b600082601f830112620014fa57600080fd5b813560206200150d620014b68362001d17565b80838252828201915082860187848660051b89010111156200152e57600080fd5b60005b858110156200154f5781358452928401929084019060010162001531565b5090979650505050505050565b803580151581146200156d57600080fd5b919050565b60008083601f8401126200158557600080fd5b50813567ffffffffffffffff8111156200159e57600080fd5b602083019150836020828501011115620015b757600080fd5b9250929050565b600082601f830112620015d057600080fd5b6200146383833560208501620014a5565b600060208284031215620015f457600080fd5b8135620014638162001e16565b6000602082840312156200161457600080fd5b8151620014638162001e16565b600080600080600080600080600060c08a8c0312156200164057600080fd5b89356200164d8162001e16565b985060208a01356200165f8162001e16565b975060408a0135965060608a013567ffffffffffffffff808211156200168457600080fd5b620016928d838e0162001572565b909850965060808c0135915080821115620016ac57600080fd5b620016ba8d838e0162001572565b909650945060a08c0135915080821115620016d457600080fd5b818c0191508c601f830112620016e957600080fd5b813581811115620016f957600080fd5b8d60208260051b85010111156200170f57600080fd5b6020830194508093505050509295985092959850929598565b600080604083850312156200173c57600080fd5b8235620017498162001e16565b9150602083013567ffffffffffffffff8111156200176657600080fd5b8301601f810185136200177857600080fd5b6200178985823560208401620014a5565b9150509250929050565b600080600060608486031215620017a957600080fd5b833567ffffffffffffffff80821115620017c257600080fd5b818601915086601f830112620017d757600080fd5b81356020620017ea620014b68362001d17565b8083825282820191508286018b848660051b89010111156200180b57600080fd5b600096505b848710156200183b578035620018268162001e16565b83526001969096019591830191830162001810565b50975050870135925050808211156200185357600080fd5b6200186187838801620014e8565b935060408601359150808211156200187857600080fd5b506200188786828701620014e8565b9150509250925092565b600060208284031215620018a457600080fd5b5051919050565b600060208284031215620018be57600080fd5b815167ffffffffffffffff811115620018d657600080fd5b8201601f81018413620018e857600080fd5b8051620018f9620014b68262001d3e565b8181528560208385010111156200190f57600080fd5b6200143d82602083016020860162001d91565b60008060008060008060c087890312156200193c57600080fd5b863567ffffffffffffffff808211156200195557600080fd5b620019638a838b01620015be565b975060208901359150808211156200197a57600080fd5b620019888a838b01620015be565b965060408901359150808211156200199f57600080fd5b620019ad8a838b01620015be565b95506060890135915080821115620019c457600080fd5b50620019d389828a01620015be565b935050620019e4608088016200155c565b9150620019f460a088016200155c565b90509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845262001a4381602086016020860162001d91565b601f01601f19169290920160200192915050565b6000825162001a6b81846020870162001d91565b9190910192915050565b6001600160a01b038316815260406020820181905260009062001a9b9083018462001a29565b949350505050565b60808152600062001ab8608083018862001a29565b602083820381850152818783528183019050818860051b8401018960005b8a81101562001b4c57858303601f190184528135368d9003601e1901811262001afe57600080fd5b8c01803567ffffffffffffffff81111562001b1857600080fd5b8036038e131562001b2857600080fd5b62001b37858289850162001a00565b95870195945050509084019060010162001ad6565b5050604086019790975250505050606001529392505050565b60208152600062001463602083018462001a29565b60408152600062001b8f604083018562001a29565b82810360208401526200143d818562001a29565b60c08152600062001bb860c083018962001a29565b828103602084015262001bcc818962001a29565b6001600160a01b03978816604085015295871660608401525050918416608083015290921660a09092019190915292915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001d0f5762001d0f62001e00565b604052919050565b600067ffffffffffffffff82111562001d345762001d3462001e00565b5060051b60200190565b600067ffffffffffffffff82111562001d5b5762001d5b62001e00565b50601f01601f191660200190565b8051602080830151919081101562001d8b576000198160200360031b1b821691505b50919050565b60005b8381101562001dae57818101518382015260200162001d94565b83811115620012cc5750506000910152565b600060001982141562001de357634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620005d357600080fdfe6080604052604051610735380380610735833981016040819052610022916102dc565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103aa565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b815260040161014891906103c6565b600080604083850312156102ef57600080fd5b82516001600160a01b038116811461030657600080fd5b60208401519092506001600160401b038082111561032357600080fd5b818501915085601f83011261033757600080fd5b81518181111561034957610349610425565b604051601f8201601f19908116603f0116810190838211818310171561037157610371610425565b8160405282815288602084870101111561038a57600080fd5b61039b8360208301602088016103f9565b80955050505050509250929050565b600082516103bc8184602087016103f9565b9190910192915050565b60208152600082518060208401526103e58160408501602087016103f9565b601f01601f19169190910160400192915050565b60005b838110156104145781810151838201526020016103fc565b838111156100645750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e091906101e8565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610204565b600082516101fa818460208701610237565b9190910192915050565b6020815260008251806020840152610223816040850160208701610237565b601f01601f19169190910160400192915050565b60005b8381101561025257818101518382015260200161023a565b83811115610261576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122051cce14dd9337037379bd43ee81331c1b371dbeb3f61c2ba0ccdb3ad0e551a9664736f6c63430008070033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a5544699208b5bb7a4aa70d601b16889abe1fce4a7597621ea167622388a1aa64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106200009d5760003560e01c8063715018a61162000060578063715018a6146200016b5780638129fc1c14620001835780638da5cb5b146200019b578063bb6decc814620001bb578063f2fde38b14620001e057600080fd5b806314b630f914620000a25780631f1bb0ef14620000e15780633659cfe614620001085780634f1ef286146200012d57806352d1902d1462000144575b600080fd5b348015620000af57600080fd5b5060c954620000c4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000ee57600080fd5b50620001066200010036600462001621565b62000205565b005b3480156200011557600080fd5b506200010662000127366004620015e1565b620004e1565b620001066200013e36600462001728565b620005d6565b3480156200015157600080fd5b506200015c620006b3565b604051908152602001620000d8565b3480156200017857600080fd5b506200010662000769565b3480156200019057600080fd5b506200010662000781565b348015620001a857600080fd5b506033546001600160a01b0316620000c4565b348015620001c857600080fd5b5062000106620001da366004620015e1565b620008a5565b348015620001ed57600080fd5b5062000106620001ff366004620015e1565b62000945565b600080620002148686620009c1565b91509150620002268888848462000d1e565b600060c960009054906101000a90046001600160a01b03166001600160a01b031663209f3695836001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200028657600080fd5b505afa1580156200029b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620002c59190810190620018ab565b846001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002ff57600080fd5b505afa15801562000314573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200033e9190810190620018ab565b8f8f8888604051602001620003599695949392919062001ba3565b60408051601f198184030181528282019091526012825271222420b23b2a37b5b2b729bab6b6b7b732b960711b602083015290889088908f906200039d9062001d69565b6040518663ffffffff1660e01b8152600401620003bf95949392919062001aa3565b602060405180830381600087803b158015620003da57600080fd5b505af1158015620003ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000415919062001601565b60405163f2fde38b60e01b81526001600160a01b0380831660048301529192509084169063f2fde38b90602401600060405180830381600087803b1580156200045d57600080fd5b505af115801562000472573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b158015620004ba57600080fd5b505af1158015620004cf573d6000803e3d6000fd5b50505050505050505050505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005365760405162461bcd60e51b81526004016200052d9062001c00565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200058160008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620005aa5760405162461bcd60e51b81526004016200052d9062001c4c565b620005b58162000f5f565b60408051600080825260208201909252620005d39183919062000f69565b50565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620006225760405162461bcd60e51b81526004016200052d9062001c00565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200066d60008051602062002562833981519152546001600160a01b031690565b6001600160a01b031614620006965760405162461bcd60e51b81526004016200052d9062001c4c565b620006a18262000f5f565b620006af8282600162000f69565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007555760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016200052d565b506000805160206200256283398151915290565b62000773620010f6565b6200077f600062001152565b565b600054610100900460ff1615808015620007a25750600054600160ff909116105b80620007be5750303b158015620007be575060005460ff166001145b620008235760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200052d565b6000805460ff19166001179055801562000847576000805461ff0019166101001790555b62000851620011a4565b6200085b620011d8565b8015620005d3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b620008af620010f6565b6001600160a01b038116620008f65760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016200052d565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016200089a565b6200094f620010f6565b6001600160a01b038116620009b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200052d565b620005d38162001152565b600080808080808080620009d8898b018b62001922565b955095509550955095509550600060c960009054906101000a90046001600160a01b03166001600160a01b031663d9118ce76040518163ffffffff1660e01b815260040160206040518083038186803b15801562000a3557600080fd5b505afa15801562000a4a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a70919062001601565b9050600060c960009054906101000a90046001600160a01b03166001600160a01b031663a23466186040518163ffffffff1660e01b815260040160206040518083038186803b15801562000ac357600080fd5b505afa15801562000ad8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000afe919062001601565b90508163562d190d60e01b878760405160240162000b1e92919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b5d9062001497565b62000b6a92919062001a75565b604051809103906000f08015801562000b87573d6000803e3d6000fd5b5099508063562d190d60e01b898960405160240162000ba892919062001b7a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000be79062001497565b62000bf492919062001a75565b604051809103906000f08015801562000c11573d6000803e3d6000fd5b5098508362000c7057886001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000c5657600080fd5b505af115801562000c6b573d6000803e3d6000fd5b505050505b8262000ccc57896001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801562000cb257600080fd5b505af115801562000cc7573d6000803e3d6000fd5b505050505b604080516001600160a01b03808d1682528b1660208201527ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a150505050505050509250929050565b6000808062000d308688018862001793565b9250925092508151835114801562000d49575080518351145b62000d875760405162461bcd60e51b815260206004820152600d60248201526c2161727261792070617269747960981b60448201526064016200052d565b60005b835181101562000f5557600082828151811062000dab5762000dab62001dea565b6020026020010151111562000e6a57856001600160a01b03166340c10f1985838151811062000dde5762000dde62001dea565b602002602001015184848151811062000dfb5762000dfb62001dea565b60200260200101516040518363ffffffff1660e01b815260040162000e359291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000e5057600080fd5b505af115801562000e65573d6000803e3d6000fd5b505050505b600083828151811062000e815762000e8162001dea565b6020026020010151111562000f4057846001600160a01b03166340c10f1985838151811062000eb45762000eb462001dea565b602002602001015185848151811062000ed15762000ed162001dea565b60200260200101516040518363ffffffff1660e01b815260040162000f0b9291906001600160a01b03929092168252602082015260400190565b600060405180830381600087803b15801562000f2657600080fd5b505af115801562000f3b573d6000803e3d6000fd5b505050505b8062000f4c8162001dc0565b91505062000d8a565b5050505050505050565b620005d3620010f6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000fa45762000f9f8362001202565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000fde57600080fd5b505afa92505050801562001011575060408051601f3d908101601f191682019092526200100e9181019062001891565b60015b620010765760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016200052d565b600080516020620025628339815191528114620010e85760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016200052d565b5062000f9f838383620012a1565b6033546001600160a01b031633146200077f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200052d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620011ce5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f620012d2565b600054610100900460ff166200077f5760405162461bcd60e51b81526004016200052d9062001c98565b6001600160a01b0381163b620012715760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200052d565b6000805160206200256283398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620012ac8362001307565b600082511180620012ba5750805b1562000f9f57620012cc838362001349565b50505050565b600054610100900460ff16620012fc5760405162461bcd60e51b81526004016200052d9062001c98565b6200077f3362001152565b620013128162001202565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620013b35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200052d565b600080846001600160a01b031684604051620013d0919062001a57565b600060405180830381855af49150503d80600081146200140d576040519150601f19603f3d011682016040523d82523d6000602084013e62001412565b606091505b50915091506200143d8282604051806060016040528060278152602001620025826027913962001446565b95945050505050565b606083156200145757508162001463565b6200146383836200146a565b9392505050565b8151156200147b5781518083602001fd5b8060405162461bcd60e51b81526004016200052d919062001b65565b6107358062001e2d83390190565b6000620014bc620014b68462001d3e565b62001ce3565b9050828152838383011115620014d157600080fd5b828260208301376000602084830101529392505050565b600082601f830112620014fa57600080fd5b813560206200150d620014b68362001d17565b80838252828201915082860187848660051b89010111156200152e57600080fd5b60005b858110156200154f5781358452928401929084019060010162001531565b5090979650505050505050565b803580151581146200156d57600080fd5b919050565b60008083601f8401126200158557600080fd5b50813567ffffffffffffffff8111156200159e57600080fd5b602083019150836020828501011115620015b757600080fd5b9250929050565b600082601f830112620015d057600080fd5b6200146383833560208501620014a5565b600060208284031215620015f457600080fd5b8135620014638162001e16565b6000602082840312156200161457600080fd5b8151620014638162001e16565b600080600080600080600080600060c08a8c0312156200164057600080fd5b89356200164d8162001e16565b985060208a01356200165f8162001e16565b975060408a0135965060608a013567ffffffffffffffff808211156200168457600080fd5b620016928d838e0162001572565b909850965060808c0135915080821115620016ac57600080fd5b620016ba8d838e0162001572565b909650945060a08c0135915080821115620016d457600080fd5b818c0191508c601f830112620016e957600080fd5b813581811115620016f957600080fd5b8d60208260051b85010111156200170f57600080fd5b6020830194508093505050509295985092959850929598565b600080604083850312156200173c57600080fd5b8235620017498162001e16565b9150602083013567ffffffffffffffff8111156200176657600080fd5b8301601f810185136200177857600080fd5b6200178985823560208401620014a5565b9150509250929050565b600080600060608486031215620017a957600080fd5b833567ffffffffffffffff80821115620017c257600080fd5b818601915086601f830112620017d757600080fd5b81356020620017ea620014b68362001d17565b8083825282820191508286018b848660051b89010111156200180b57600080fd5b600096505b848710156200183b578035620018268162001e16565b83526001969096019591830191830162001810565b50975050870135925050808211156200185357600080fd5b6200186187838801620014e8565b935060408601359150808211156200187857600080fd5b506200188786828701620014e8565b9150509250925092565b600060208284031215620018a457600080fd5b5051919050565b600060208284031215620018be57600080fd5b815167ffffffffffffffff811115620018d657600080fd5b8201601f81018413620018e857600080fd5b8051620018f9620014b68262001d3e565b8181528560208385010111156200190f57600080fd5b6200143d82602083016020860162001d91565b60008060008060008060c087890312156200193c57600080fd5b863567ffffffffffffffff808211156200195557600080fd5b620019638a838b01620015be565b975060208901359150808211156200197a57600080fd5b620019888a838b01620015be565b965060408901359150808211156200199f57600080fd5b620019ad8a838b01620015be565b95506060890135915080821115620019c457600080fd5b50620019d389828a01620015be565b935050620019e4608088016200155c565b9150620019f460a088016200155c565b90509295509295509295565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845262001a4381602086016020860162001d91565b601f01601f19169290920160200192915050565b6000825162001a6b81846020870162001d91565b9190910192915050565b6001600160a01b038316815260406020820181905260009062001a9b9083018462001a29565b949350505050565b60808152600062001ab8608083018862001a29565b602083820381850152818783528183019050818860051b8401018960005b8a81101562001b4c57858303601f190184528135368d9003601e1901811262001afe57600080fd5b8c01803567ffffffffffffffff81111562001b1857600080fd5b8036038e131562001b2857600080fd5b62001b37858289850162001a00565b95870195945050509084019060010162001ad6565b5050604086019790975250505050606001529392505050565b60208152600062001463602083018462001a29565b60408152600062001b8f604083018562001a29565b82810360208401526200143d818562001a29565b60c08152600062001bb860c083018962001a29565b828103602084015262001bcc818962001a29565b6001600160a01b03978816604085015295871660608401525050918416608083015290921660a09092019190915292915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171562001d0f5762001d0f62001e00565b604052919050565b600067ffffffffffffffff82111562001d345762001d3462001e00565b5060051b60200190565b600067ffffffffffffffff82111562001d5b5762001d5b62001e00565b50601f01601f191660200190565b8051602080830151919081101562001d8b576000198160200360031b1b821691505b50919050565b60005b8381101562001dae57818101518382015260200162001d94565b83811115620012cc5750506000910152565b600060001982141562001de357634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620005d357600080fdfe6080604052604051610735380380610735833981016040819052610022916102dc565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103aa565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b815260040161014891906103c6565b600080604083850312156102ef57600080fd5b82516001600160a01b038116811461030657600080fd5b60208401519092506001600160401b038082111561032357600080fd5b818501915085601f83011261033757600080fd5b81518181111561034957610349610425565b604051601f8201601f19908116603f0116810190838211818310171561037157610371610425565b8160405282815288602084870101111561038a57600080fd5b61039b8360208301602088016103f9565b80955050505050509250929050565b600082516103bc8184602087016103f9565b9190910192915050565b60208152600082518060208401526103e58160408501602087016103f9565b601f01601f19169190910160400192915050565b60005b838110156104145781810151838201526020016103fc565b838111156100645750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e091906101e8565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610204565b600082516101fa818460208701610237565b9190910192915050565b6020815260008251806020840152610223816040850160208701610237565b601f01601f19169190910160400192915050565b60005b8381101561025257818101518382015260200161023a565b83811115610261576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122051cce14dd9337037379bd43ee81331c1b371dbeb3f61c2ba0ccdb3ad0e551a9664736f6c63430008070033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a5544699208b5bb7a4aa70d601b16889abe1fce4a7597621ea167622388a1aa64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setSummonerAddr(address)": { + "details": "Sets the address of the BaalSummoner contract", + "params": { + "baalSummoner": "The address of the BaalSummoner contract" + } + }, + "summonBaalFromReferrer(address,address,uint256,bytes,bytes,bytes[])": { + "details": "Summon a new Baal contract with a new set of tokens", + "params": { + "_forwarderAddr": "The address of the forwarder to be used, 0x0 if not set", + "_safeAddr": "The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe", + "_saltNonce": "The salt nonce to be used for the Safe contract", + "initializationMintParams": "The parameters for minting the tokens", + "initializationTokenParams": "The parameters for deploying the tokens", + "postInitializationActions": "The actions to be performed after the initialization" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13087, + "contract": "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol:BaalAdvTokenSummoner", + "label": "_baalSummoner", + "offset": 0, + "slot": "201", + "type": "t_contract(IBaalSummoner)14323" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IBaalSummoner)14323": { + "encoding": "inplace", + "label": "contract IBaalSummoner", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAdvTokenSummoner_Proxy.json b/deployments/sepolia/BaalAdvTokenSummoner_Proxy.json new file mode 100644 index 0000000..4a57bb3 --- /dev/null +++ b/deployments/sepolia/BaalAdvTokenSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "transactionIndex": 31, + "gasUsed": "333488", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000002000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000004000000080002000000000000000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000000000002000000000020000000200000000000000000402000000000000000000200000000000000000000", + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e", + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "logs": [ + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000004aff5c9eced3a7a6d3b7039fca520a5674a981ea" + ], + "data": "0x", + "logIndex": 18, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + }, + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + }, + { + "transactionIndex": 31, + "blockNumber": 4816783, + "transactionHash": "0xb6ce50242d95b777aec2564897621877fc6239fd6684b04c82ab33f40b65da6c", + "address": "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 20, + "blockHash": "0xb1009ac8909c2347bf3928b2f05c66bbe2026d2b8cd12d4951ed5a49e459a28e" + } + ], + "blockNumber": 4816783, + "cumulativeGasUsed": "2058194", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4AFf5C9ECEd3a7a6D3B7039FCA520a5674A981eA", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAndVaultSummoner.json b/deployments/sepolia/BaalAndVaultSummoner.json new file mode 100644 index 0000000..6d8994c --- /dev/null +++ b/deployments/sepolia/BaalAndVaultSummoner.json @@ -0,0 +1,593 @@ +{ + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct BaalAndVaultSummoner.Vault", + "name": "vault", + "type": "tuple" + } + ], + "name": "SetVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "deactivateVaultAsDao", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setNewVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonBaalAndVault", + "outputs": [ + { + "internalType": "address", + "name": "_daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonVault", + "outputs": [ + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [], + "name": "vaultIdx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "vaults", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "transactionIndex": 24, + "gasUsed": "335695", + "logsBloom": "0x00000000000100000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000004000020000000000000000000800000000080000000000000000000000400000000000200000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000000000000001000000000000000020000000000000000000040000000000000000000000000000010020000000200000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05", + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "logs": [ + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f8e5e3b80393aef6a3fb9c3dba24ec4233a477de" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + }, + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + }, + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 17, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + } + ], + "blockNumber": 4816775, + "cumulativeGasUsed": "3003865", + "status": 1, + "byzantium": true + }, + "args": [ + "0xF8E5E3b80393AeF6a3Fb9C3DbA24ec4233A477De", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xF8E5E3b80393AeF6a3Fb9C3DbA24ec4233A477De", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAndVaultSummoner_Implementation.json b/deployments/sepolia/BaalAndVaultSummoner_Implementation.json new file mode 100644 index 0000000..c7647b3 --- /dev/null +++ b/deployments/sepolia/BaalAndVaultSummoner_Implementation.json @@ -0,0 +1,747 @@ +{ + "address": "0xF8E5E3b80393AeF6a3Fb9C3DbA24ec4233A477De", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "SetDelegate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct BaalAndVaultSummoner.Vault", + "name": "vault", + "type": "tuple" + } + ], + "name": "SetVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "summoner", + "type": "address" + } + ], + "name": "setSummoner", + "type": "event" + }, + { + "inputs": [], + "name": "_baalSummoner", + "outputs": [ + { + "internalType": "contract IBaalSummoner", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "deactivateVaultAsDao", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "setDelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setNewVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baalSummoner", + "type": "address" + } + ], + "name": "setSummonerAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonBaalAndVault", + "outputs": [ + { + "internalType": "address", + "name": "_daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "summonVault", + "outputs": [ + { + "internalType": "address", + "name": "_vaultAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "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" + }, + { + "inputs": [], + "name": "vaultIdx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "vaults", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "vaultAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x44c3031d2dfcb0555234cee0ac8f3aad4e732b8270434408e0e236634e3db647", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xF8E5E3b80393AeF6a3Fb9C3DbA24ec4233A477De", + "transactionIndex": 32, + "gasUsed": "1561686", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xaec79ef4f0b3f9e257291be0afd2cdc93809bb433316e476f5c4392eda36f839", + "transactionHash": "0x44c3031d2dfcb0555234cee0ac8f3aad4e732b8270434408e0e236634e3db647", + "logs": [], + "blockNumber": 4816774, + "cumulativeGasUsed": "6589136", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"SetDelegate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"struct BaalAndVaultSummoner.Vault\",\"name\":\"vault\",\"type\":\"tuple\"}],\"name\":\"SetVault\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"summoner\",\"type\":\"address\"}],\"name\":\"setSummoner\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_baalSummoner\",\"outputs\":[{\"internalType\":\"contract IBaalSummoner\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"}],\"name\":\"deactivateVaultAsDao\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"setDelegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setNewVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baalSummoner\",\"type\":\"address\"}],\"name\":\"setSummonerAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"setVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"summonBaalAndVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vaultAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"summonVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_vaultAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"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\"},{\"inputs\":[],\"name\":\"vaultIdx\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vaults\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaultAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"deactivateVaultAsDao(uint256,address)\":{\"notice\":\"A DAO can set a Vault as inactive \"},\"setDelegate(address,address)\":{\"notice\":\"Allow a Dao to set a delegate that can manage vault enteries \"},\"setNewVault(address,address,string)\":{\"notice\":\"set a new Vault as active on existing dao (owner only) \"},\"setVault(uint256,bool)\":{\"notice\":\"set a Vault as active or not on existing dao (owner only) \"},\"summonBaalAndVault(bytes,bytes[],uint256,bytes32,string)\":{\"notice\":\"Summon a new baal and add a Vault \"},\"summonVault(address,string)\":{\"notice\":\"create and add a Vault(Safe) to an existing DAO \"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/higherOrderFactories/BaalAndVaultSummoner.sol\":\"BaalAndVaultSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"contracts/higherOrderFactories/BaalAndVaultSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"../interfaces/IBaalSummoner.sol\\\";\\n\\n/*\\nSummon new 'non-ragequitable' treasury Safe (Vaults). (sidecar?)\\nCan summon a dao with a new Vault.\\nCan summon a new vault for a dao after initial dao setup.\\nActs as a register and the owner of the contract or DAO can deactivate\\nregister is primarily a helper for UIs\\nOwner of the contract can add new vaults, and set current vaults\\nContract is upgradable and should be owned by a DAO\\n*/\\ncontract BaalAndVaultSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\\n\\n IBaalSummoner public _baalSummoner;\\n uint256 public vaultIdx;\\n\\n struct Vault{\\n uint256 id;\\n bool active;\\n address daoAddress;\\n address vaultAddress;\\n string name;\\n }\\n mapping(uint256 => Vault) public vaults;\\n mapping(address => address) public delegates;\\n\\n event SetVault(\\n Vault vault\\n );\\n\\n event SetDelegate(\\n address daoAddress,\\n address delegate\\n );\\n\\n event setSummoner(\\n address summoner\\n );\\n\\n function initialize() initializer public {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n vaultIdx = 0;\\n }\\n\\n function setSummonerAddr(\\n address baalSummoner\\n ) public onlyOwner {\\n require(baalSummoner != address(0), \\\"zero address\\\");\\n _baalSummoner = IBaalSummoner(baalSummoner);\\n emit setSummoner(baalSummoner);\\n }\\n\\n /** Summon a new baal and add a Vault */\\n function summonBaalAndVault(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 saltNonce,\\n bytes32 referrer,\\n string memory name\\n ) external returns (address _daoAddress, address _vaultAddress) {\\n _daoAddress = _baalSummoner.summonBaalFromReferrer(\\n initializationParams,\\n initializationActions,\\n saltNonce,\\n referrer\\n );\\n _vaultAddress = summonVault(_daoAddress, name);\\n }\\n\\n /** create and add a Vault(Safe) to an existing DAO */\\n function summonVault(\\n address daoAddress,\\n string memory name\\n ) public returns (address _vaultAddress) {\\n _vaultAddress = _baalSummoner.deployAndSetupSafe(\\n daoAddress\\n );\\n _setNewVault(name, daoAddress, _vaultAddress);\\n }\\n\\n /** set a Vault as active or not on existing dao (owner only) */\\n // Admin functions to help maintain the registry.\\n function setVault(\\n uint256 id,\\n bool active\\n ) public onlyOwner\\n {\\n _setVault(id, active);\\n }\\n\\n /** set a new Vault as active on existing dao (owner only) */\\n // Admin functions to help maintain the registry.\\n function setNewVault(\\n address daoAddress, \\n address vaultAddress,\\n string memory name\\n ) public onlyOwner\\n {\\n _setNewVault(name, daoAddress, vaultAddress);\\n }\\n\\n /** \\n A DAO can set a Vault as inactive \\n */\\n function deactivateVaultAsDao(\\n uint256 id,\\n address daoAddress\\n ) external\\n {\\n require(msg.sender == daoAddress || msg.sender == delegates[daoAddress], \\\"not DAO or delegate\\\");\\n require(vaults[id].daoAddress == daoAddress && vaults[id].active,\\\"!not active DAO vault\\\");\\n _setVault(id, false);\\n }\\n\\n /** Allow a Dao to set a delegate that can manage vault enteries */\\n function setDelegate(\\n address daoAddress,\\n address delegate\\n ) external\\n {\\n require(msg.sender == daoAddress, \\\"!DAO\\\");\\n delegates[daoAddress] = delegate;\\n emit SetDelegate(daoAddress, delegate);\\n }\\n\\n\\n function _setVault(\\n uint256 id, \\n bool active\\n ) internal \\n {\\n vaults[id].active = active;\\n emit SetVault(vaults[id]);\\n }\\n\\n function _setNewVault(\\n string memory name,\\n address daoAddress, \\n address vaultAddress\\n ) internal \\n {\\n vaultIdx += 1;\\n vaults[vaultIdx] = Vault(vaultIdx, true, daoAddress, vaultAddress, name);\\n emit SetVault(vaults[vaultIdx]);\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n onlyOwner\\n override\\n {}\\n}\\n\",\"keccak256\":\"0x5519dacfb28e1a8ec59e4653d8d85f18a2ecf32a9ec00627d4575c94c2c27553\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalSummoner.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalSummoner {\\n event AdminChanged(address previousAdmin, address newAdmin);\\n event BeaconUpgraded(address indexed beacon);\\n event DaoReferral(bytes32 referrer, address daoAddress);\\n event DeployBaalSafe(address baalSafe, address moduleAddr);\\n event DeployBaalTokens(address lootToken, address sharesToken);\\n event Initialized(uint8 version);\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n event SetAddrsVersion(uint256 version);\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n event Upgraded(address indexed implementation);\\n\\n function setAddrs(\\n address _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) external;\\n\\n function initialize() external;\\n\\n function transferOwnership(address newOwner) external;\\n function upgradeTo(address newImplementation) external;\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\\n function renounceOwnership() external;\\n\\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\\n external\\n returns (address);\\n function summonBaalFromReferrer(\\n bytes memory initializationParams,\\n bytes[] memory initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address);\\n\\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\\n function deployTokens(string memory _name, string memory _symbol)\\n external\\n returns (address lootToken, address sharesToken);\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend);\\n function addrsVersion() external view returns (uint256);\\n function gnosisFallbackLibrary() external view returns (address);\\n function gnosisMultisendLibrary() external view returns (address);\\n function gnosisSingleton() external view returns (address);\\n function lootSingleton() external view returns (address);\\n function sharesSingleton() external view returns (address);\\n function owner() external view returns (address);\\n function proxiableUUID() external view returns (bytes32);\\n function template() external view returns (address);\\n}\\n\",\"keccak256\":\"0xc5eb34a9c49792956ed8574ce0fae742c3ea655101a890965caf7e7983e1be79\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b60805234801561001757600080fd5b5060805160601c611b4c6100526000396000818161049f015281816104df0152818161057f015281816105bf015261064e0152611b4c6000f3fe6080604052600436106101095760003560e01c80638129fc1c11610095578063ac06a9a911610064578063ac06a9a9146102f2578063b395f08614610312578063bb6decc814610332578063bedfb8d414610352578063f2fde38b1461036857600080fd5b80638129fc1c1461024e5780638c64ea4a146102635780638da5cb5b14610294578063a156d863146102b257600080fd5b806352d1902d116100dc57806352d1902d146101a0578063587cde1e146101c35780635c873849146101f9578063619dd5d414610219578063715018a61461023957600080fd5b8063133afcc01461010e57806314b630f9146101305780633659cfe61461016d5780634f1ef2861461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611678565b610388565b005b34801561013c57600080fd5b5060c954610150906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017957600080fd5b5061012e6101883660046113f5565b610494565b61012e61019b3660046114ca565b610574565b3480156101ac57600080fd5b506101b5610641565b604051908152602001610164565b3480156101cf57600080fd5b506101506101de3660046113f5565b60cc602052600090815260409020546001600160a01b031681565b34801561020557600080fd5b5061012e61021436600461142f565b6106f4565b34801561022557600080fd5b5061012e61023436600461169d565b6107a1565b34801561024557600080fd5b5061012e6107b3565b34801561025a57600080fd5b5061012e6107c7565b34801561026f57600080fd5b5061028361027e36600461165f565b6108e5565b6040516101649594939291906119d2565b3480156102a057600080fd5b506033546001600160a01b0316610150565b3480156102be57600080fd5b506102d26102cd36600461158d565b6109b0565b604080516001600160a01b03938416815292909116602083015201610164565b3480156102fe57600080fd5b5061015061030d36600461152e565b610a5b565b34801561031e57600080fd5b5061012e61032d366004611468565b610aee565b34801561033e57600080fd5b5061012e61034d3660046113f5565b610b06565b34801561035e57600080fd5b506101b560ca5481565b34801561037457600080fd5b5061012e6103833660046113f5565b610ba1565b336001600160a01b03821614806103b857506001600160a01b03818116600090815260cc60205260409020541633145b6103ff5760405162461bcd60e51b81526020600482015260136024820152726e6f742044414f206f722064656c656761746560681b60448201526064015b60405180910390fd5b600082815260cb60205260409020600101546001600160a01b03828116610100909204161480156104415750600082815260cb602052604090206001015460ff165b6104855760405162461bcd60e51b8152602060048201526015602482015274085b9bdd081858dd1a5d9948111053c81d985d5b1d605a1b60448201526064016103f6565b610490826000610c17565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156104dd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610526600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461054c5760405162461bcd60e51b81526004016103f690611852565b61055581610c64565b6040805160008082526020820190925261057191839190610c6c565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105bd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610606600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461062c5760405162461bcd60e51b81526004016103f690611852565b61063582610c64565b61049082826001610c6c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106e15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016103f6565b50600080516020611ad083398151915290565b336001600160a01b038316146107355760405162461bcd60e51b81526004016103f6906020808252600490820152632144414f60e01b604082015260600190565b6001600160a01b03828116600081815260cc602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91015b60405180910390a15050565b6107a9610de6565b6104908282610c17565b6107bb610de6565b6107c56000610e40565b565b600054610100900460ff16158080156107e75750600054600160ff909116105b806108015750303b158015610801575060005460ff166001145b6108645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103f6565b6000805460ff191660011790558015610887576000805461ff0019166101001790555b61088f610e92565b610897610ec1565b600060ca558015610571576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b60cb602052600090815260409020805460018201546002830154600384018054939460ff8416946101009094046001600160a01b039081169493169290919061092d90611a69565b80601f016020809104026020016040519081016040528092919081815260200182805461095990611a69565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b5050505050905085565b60c95460405163209f369560e01b815260009182916001600160a01b039091169063209f3695906109ef908c908c908c908c908c908c90600401611738565b602060405180830381600087803b158015610a0957600080fd5b505af1158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a419190611412565b9150610a4d8284610a5b565b905097509795505050505050565b60c954604051633e2108c760e21b81526001600160a01b038481166004830152600092169063f884231c90602401602060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190611412565b9050610ae8828483610ee8565b92915050565b610af6610de6565b610b01818484610ee8565b505050565b610b0e610de6565b6001600160a01b038116610b535760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016103f6565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016108da565b610ba9610de6565b6001600160a01b038116610c0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b61057181610e40565b600082815260cb60205260409081902060018101805460ff191684151517905590517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f7891610795916118e9565b610571610de6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c9f57610b0183611005565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd857600080fd5b505afa925050508015610d08575060408051601f3d908101601f19168201909252610d0591810190611574565b60015b610d6b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016103f6565b600080516020611ad08339815191528114610dda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016103f6565b50610b018383836110a1565b6033546001600160a01b031633146107c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610eb95760405162461bcd60e51b81526004016103f69061189e565b6107c56110cc565b600054610100900460ff166107c55760405162461bcd60e51b81526004016103f69061189e565b600160ca6000828254610efb9190611a17565b90915550506040805160a08101825260ca54808252600160208084018281526001600160a01b0388811686880190815288821660608801908152608088018c8152600097885260cb865298909620875181559251948301805491516001600160a81b0319909216951515610100600160a81b03191695909517610100918316919091021790935592516002840180546001600160a01b03191691909316179091559251805192939192610fb4926003850192019061127a565b505060ca54600090815260cb60205260409081902090517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f789250610ff891906118e9565b60405180910390a1505050565b6001600160a01b0381163b6110725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016103f6565b600080516020611ad083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6110aa836110fc565b6000825111806110b75750805b15610b01576110c6838361113c565b50505050565b600054610100900460ff166110f35760405162461bcd60e51b81526004016103f69061189e565b6107c533610e40565b61110581611005565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6111a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016103f6565b600080846001600160a01b0316846040516111bf919061171c565b600060405180830381855af49150503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b50915091506112278282604051806060016040528060278152602001611af060279139611230565b95945050505050565b6060831561123f575081611249565b6112498383611250565b9392505050565b8151156112605781518083602001fd5b8060405162461bcd60e51b81526004016103f691906117f3565b82805461128690611a69565b90600052602060002090601f0160209004810192826112a857600085556112ee565b82601f106112c157805160ff19168380011785556112ee565b828001600101855582156112ee579182015b828111156112ee5782518255916020019190600101906112d3565b506112fa9291506112fe565b5090565b5b808211156112fa57600081556001016112ff565b600067ffffffffffffffff8084111561132e5761132e611aa4565b604051601f8501601f19908116603f0116810190828211818310171561135657611356611aa4565b8160405280935085815286868601111561136f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f84011261139b57600080fd5b50813567ffffffffffffffff8111156113b357600080fd5b6020830191508360208260051b85010111156113ce57600080fd5b9250929050565b600082601f8301126113e657600080fd5b61124983833560208501611313565b60006020828403121561140757600080fd5b813561124981611aba565b60006020828403121561142457600080fd5b815161124981611aba565b6000806040838503121561144257600080fd5b823561144d81611aba565b9150602083013561145d81611aba565b809150509250929050565b60008060006060848603121561147d57600080fd5b833561148881611aba565b9250602084013561149881611aba565b9150604084013567ffffffffffffffff8111156114b457600080fd5b6114c0868287016113d5565b9150509250925092565b600080604083850312156114dd57600080fd5b82356114e881611aba565b9150602083013567ffffffffffffffff81111561150457600080fd5b8301601f8101851361151557600080fd5b61152485823560208401611313565b9150509250929050565b6000806040838503121561154157600080fd5b823561154c81611aba565b9150602083013567ffffffffffffffff81111561156857600080fd5b611524858286016113d5565b60006020828403121561158657600080fd5b5051919050565b600080600080600080600060a0888a0312156115a857600080fd5b873567ffffffffffffffff808211156115c057600080fd5b818a0191508a601f8301126115d457600080fd5b8135818111156115e357600080fd5b8b60208285010111156115f557600080fd5b60209283019950975090890135908082111561161057600080fd5b61161c8b838c01611389565b909750955060408a0135945060608a0135935060808a013591508082111561164357600080fd5b506116508a828b016113d5565b91505092959891949750929550565b60006020828403121561167157600080fd5b5035919050565b6000806040838503121561168b57600080fd5b82359150602083013561145d81611aba565b600080604083850312156116b057600080fd5b823591506020830135801515811461145d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452611708816020860160208601611a3d565b601f01601f19169290920160200192915050565b6000825161172e818460208701611a3d565b9190910192915050565b60808152600061174c60808301888a6116c7565b602083820381850152818783528183019050818860051b8401018960005b8a8110156117d957858303601f190184528135368d9003601e1901811261179057600080fd5b8c01803567ffffffffffffffff8111156117a957600080fd5b8036038e13156117b857600080fd5b6117c585828985016116c7565b95870195945050509084019060010161176a565b505060408601979097525050505060600152949350505050565b60208152600061124960208301846116f0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825282548282015260018084015460ff81161515604085015260081c6001600160a01b039081166060850152600285015416608084015260a080840152600384018054600093929190849080841c8185168061194957607f821691505b86821081141561196757634e487b7160e01b84526022600452602484fd5b60c0890182905260e089018180156119865760018114611997576119c2565b60ff198516825288820195506119c2565b60008781526020902060005b858110156119bc57815484820152908901908a016119a3565b83019650505b50939a9950505050505050505050565b85815284151560208201526001600160a01b0384811660408301528316606082015260a060808201819052600090611a0c908301846116f0565b979650505050505050565b60008219821115611a3857634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015611a58578181015183820152602001611a40565b838111156110c65750506000910152565b600181811c90821680611a7d57607f821691505b60208210811415611a9e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461057157600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a147e58c05b20357cb3919a570b985d63b405a5c57197b71f94854fda882a9a64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c80638129fc1c11610095578063ac06a9a911610064578063ac06a9a9146102f2578063b395f08614610312578063bb6decc814610332578063bedfb8d414610352578063f2fde38b1461036857600080fd5b80638129fc1c1461024e5780638c64ea4a146102635780638da5cb5b14610294578063a156d863146102b257600080fd5b806352d1902d116100dc57806352d1902d146101a0578063587cde1e146101c35780635c873849146101f9578063619dd5d414610219578063715018a61461023957600080fd5b8063133afcc01461010e57806314b630f9146101305780633659cfe61461016d5780634f1ef2861461018d575b600080fd5b34801561011a57600080fd5b5061012e610129366004611678565b610388565b005b34801561013c57600080fd5b5060c954610150906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561017957600080fd5b5061012e6101883660046113f5565b610494565b61012e61019b3660046114ca565b610574565b3480156101ac57600080fd5b506101b5610641565b604051908152602001610164565b3480156101cf57600080fd5b506101506101de3660046113f5565b60cc602052600090815260409020546001600160a01b031681565b34801561020557600080fd5b5061012e61021436600461142f565b6106f4565b34801561022557600080fd5b5061012e61023436600461169d565b6107a1565b34801561024557600080fd5b5061012e6107b3565b34801561025a57600080fd5b5061012e6107c7565b34801561026f57600080fd5b5061028361027e36600461165f565b6108e5565b6040516101649594939291906119d2565b3480156102a057600080fd5b506033546001600160a01b0316610150565b3480156102be57600080fd5b506102d26102cd36600461158d565b6109b0565b604080516001600160a01b03938416815292909116602083015201610164565b3480156102fe57600080fd5b5061015061030d36600461152e565b610a5b565b34801561031e57600080fd5b5061012e61032d366004611468565b610aee565b34801561033e57600080fd5b5061012e61034d3660046113f5565b610b06565b34801561035e57600080fd5b506101b560ca5481565b34801561037457600080fd5b5061012e6103833660046113f5565b610ba1565b336001600160a01b03821614806103b857506001600160a01b03818116600090815260cc60205260409020541633145b6103ff5760405162461bcd60e51b81526020600482015260136024820152726e6f742044414f206f722064656c656761746560681b60448201526064015b60405180910390fd5b600082815260cb60205260409020600101546001600160a01b03828116610100909204161480156104415750600082815260cb602052604090206001015460ff165b6104855760405162461bcd60e51b8152602060048201526015602482015274085b9bdd081858dd1a5d9948111053c81d985d5b1d605a1b60448201526064016103f6565b610490826000610c17565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156104dd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610526600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461054c5760405162461bcd60e51b81526004016103f690611852565b61055581610c64565b6040805160008082526020820190925261057191839190610c6c565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105bd5760405162461bcd60e51b81526004016103f690611806565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610606600080516020611ad0833981519152546001600160a01b031690565b6001600160a01b03161461062c5760405162461bcd60e51b81526004016103f690611852565b61063582610c64565b61049082826001610c6c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106e15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016103f6565b50600080516020611ad083398151915290565b336001600160a01b038316146107355760405162461bcd60e51b81526004016103f6906020808252600490820152632144414f60e01b604082015260600190565b6001600160a01b03828116600081815260cc602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fbeebfeebc9d1af8057ca45af36b2171fea34cb5b251e394f0bc5fcabde119d7f91015b60405180910390a15050565b6107a9610de6565b6104908282610c17565b6107bb610de6565b6107c56000610e40565b565b600054610100900460ff16158080156107e75750600054600160ff909116105b806108015750303b158015610801575060005460ff166001145b6108645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103f6565b6000805460ff191660011790558015610887576000805461ff0019166101001790555b61088f610e92565b610897610ec1565b600060ca558015610571576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b60cb602052600090815260409020805460018201546002830154600384018054939460ff8416946101009094046001600160a01b039081169493169290919061092d90611a69565b80601f016020809104026020016040519081016040528092919081815260200182805461095990611a69565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b5050505050905085565b60c95460405163209f369560e01b815260009182916001600160a01b039091169063209f3695906109ef908c908c908c908c908c908c90600401611738565b602060405180830381600087803b158015610a0957600080fd5b505af1158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a419190611412565b9150610a4d8284610a5b565b905097509795505050505050565b60c954604051633e2108c760e21b81526001600160a01b038481166004830152600092169063f884231c90602401602060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb9190611412565b9050610ae8828483610ee8565b92915050565b610af6610de6565b610b01818484610ee8565b505050565b610b0e610de6565b6001600160a01b038116610b535760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016103f6565b60c980546001600160a01b0319166001600160a01b0383169081179091556040519081527ff471c7a7115723e1d5e0a3b924bec97596831b94082a24d73c8c3210c6cb3b06906020016108da565b610ba9610de6565b6001600160a01b038116610c0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b61057181610e40565b600082815260cb60205260409081902060018101805460ff191684151517905590517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f7891610795916118e9565b610571610de6565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c9f57610b0183611005565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd857600080fd5b505afa925050508015610d08575060408051601f3d908101601f19168201909252610d0591810190611574565b60015b610d6b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016103f6565b600080516020611ad08339815191528114610dda5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016103f6565b50610b018383836110a1565b6033546001600160a01b031633146107c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610eb95760405162461bcd60e51b81526004016103f69061189e565b6107c56110cc565b600054610100900460ff166107c55760405162461bcd60e51b81526004016103f69061189e565b600160ca6000828254610efb9190611a17565b90915550506040805160a08101825260ca54808252600160208084018281526001600160a01b0388811686880190815288821660608801908152608088018c8152600097885260cb865298909620875181559251948301805491516001600160a81b0319909216951515610100600160a81b03191695909517610100918316919091021790935592516002840180546001600160a01b03191691909316179091559251805192939192610fb4926003850192019061127a565b505060ca54600090815260cb60205260409081902090517f70720885c820c73facaa75bc2669991b591d9fd2a1e2507a4a9a8022f9336f789250610ff891906118e9565b60405180910390a1505050565b6001600160a01b0381163b6110725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016103f6565b600080516020611ad083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6110aa836110fc565b6000825111806110b75750805b15610b01576110c6838361113c565b50505050565b600054610100900460ff166110f35760405162461bcd60e51b81526004016103f69061189e565b6107c533610e40565b61110581611005565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6111a45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016103f6565b600080846001600160a01b0316846040516111bf919061171c565b600060405180830381855af49150503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b50915091506112278282604051806060016040528060278152602001611af060279139611230565b95945050505050565b6060831561123f575081611249565b6112498383611250565b9392505050565b8151156112605781518083602001fd5b8060405162461bcd60e51b81526004016103f691906117f3565b82805461128690611a69565b90600052602060002090601f0160209004810192826112a857600085556112ee565b82601f106112c157805160ff19168380011785556112ee565b828001600101855582156112ee579182015b828111156112ee5782518255916020019190600101906112d3565b506112fa9291506112fe565b5090565b5b808211156112fa57600081556001016112ff565b600067ffffffffffffffff8084111561132e5761132e611aa4565b604051601f8501601f19908116603f0116810190828211818310171561135657611356611aa4565b8160405280935085815286868601111561136f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f84011261139b57600080fd5b50813567ffffffffffffffff8111156113b357600080fd5b6020830191508360208260051b85010111156113ce57600080fd5b9250929050565b600082601f8301126113e657600080fd5b61124983833560208501611313565b60006020828403121561140757600080fd5b813561124981611aba565b60006020828403121561142457600080fd5b815161124981611aba565b6000806040838503121561144257600080fd5b823561144d81611aba565b9150602083013561145d81611aba565b809150509250929050565b60008060006060848603121561147d57600080fd5b833561148881611aba565b9250602084013561149881611aba565b9150604084013567ffffffffffffffff8111156114b457600080fd5b6114c0868287016113d5565b9150509250925092565b600080604083850312156114dd57600080fd5b82356114e881611aba565b9150602083013567ffffffffffffffff81111561150457600080fd5b8301601f8101851361151557600080fd5b61152485823560208401611313565b9150509250929050565b6000806040838503121561154157600080fd5b823561154c81611aba565b9150602083013567ffffffffffffffff81111561156857600080fd5b611524858286016113d5565b60006020828403121561158657600080fd5b5051919050565b600080600080600080600060a0888a0312156115a857600080fd5b873567ffffffffffffffff808211156115c057600080fd5b818a0191508a601f8301126115d457600080fd5b8135818111156115e357600080fd5b8b60208285010111156115f557600080fd5b60209283019950975090890135908082111561161057600080fd5b61161c8b838c01611389565b909750955060408a0135945060608a0135935060808a013591508082111561164357600080fd5b506116508a828b016113d5565b91505092959891949750929550565b60006020828403121561167157600080fd5b5035919050565b6000806040838503121561168b57600080fd5b82359150602083013561145d81611aba565b600080604083850312156116b057600080fd5b823591506020830135801515811461145d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452611708816020860160208601611a3d565b601f01601f19169290920160200192915050565b6000825161172e818460208701611a3d565b9190910192915050565b60808152600061174c60808301888a6116c7565b602083820381850152818783528183019050818860051b8401018960005b8a8110156117d957858303601f190184528135368d9003601e1901811261179057600080fd5b8c01803567ffffffffffffffff8111156117a957600080fd5b8036038e13156117b857600080fd5b6117c585828985016116c7565b95870195945050509084019060010161176a565b505060408601979097525050505060600152949350505050565b60208152600061124960208301846116f0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b602080825282548282015260018084015460ff81161515604085015260081c6001600160a01b039081166060850152600285015416608084015260a080840152600384018054600093929190849080841c8185168061194957607f821691505b86821081141561196757634e487b7160e01b84526022600452602484fd5b60c0890182905260e089018180156119865760018114611997576119c2565b60ff198516825288820195506119c2565b60008781526020902060005b858110156119bc57815484820152908901908a016119a3565b83019650505b50939a9950505050505050505050565b85815284151560208201526001600160a01b0384811660408301528316606082015260a060808201819052600090611a0c908301846116f0565b979650505050505050565b60008219821115611a3857634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015611a58578181015183820152602001611a40565b838111156110c65750506000910152565b600181811c90821680611a7d57607f821691505b60208210811415611a9e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461057157600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201a147e58c05b20357cb3919a570b985d63b405a5c57197b71f94854fda882a9a64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "deactivateVaultAsDao(uint256,address)": { + "notice": "A DAO can set a Vault as inactive " + }, + "setDelegate(address,address)": { + "notice": "Allow a Dao to set a delegate that can manage vault enteries " + }, + "setNewVault(address,address,string)": { + "notice": "set a new Vault as active on existing dao (owner only) " + }, + "setVault(uint256,bool)": { + "notice": "set a Vault as active or not on existing dao (owner only) " + }, + "summonBaalAndVault(bytes,bytes[],uint256,bytes32,string)": { + "notice": "Summon a new baal and add a Vault " + }, + "summonVault(address,string)": { + "notice": "create and add a Vault(Safe) to an existing DAO " + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 13477, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "_baalSummoner", + "offset": 0, + "slot": "201", + "type": "t_contract(IBaalSummoner)14323" + }, + { + "astId": 13479, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaultIdx", + "offset": 0, + "slot": "202", + "type": "t_uint256" + }, + { + "astId": 13495, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaults", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_uint256,t_struct(Vault)13490_storage)" + }, + { + "astId": 13499, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "delegates", + "offset": 0, + "slot": "204", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IBaalSummoner)14323": { + "encoding": "inplace", + "label": "contract IBaalSummoner", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_struct(Vault)13490_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct BaalAndVaultSummoner.Vault)", + "numberOfBytes": "32", + "value": "t_struct(Vault)13490_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Vault)13490_storage": { + "encoding": "inplace", + "label": "struct BaalAndVaultSummoner.Vault", + "members": [ + { + "astId": 13481, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 13483, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "active", + "offset": 0, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 13485, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "daoAddress", + "offset": 1, + "slot": "1", + "type": "t_address" + }, + { + "astId": 13487, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "vaultAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 13489, + "contract": "contracts/higherOrderFactories/BaalAndVaultSummoner.sol:BaalAndVaultSummoner", + "label": "name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalAndVaultSummoner_Proxy.json b/deployments/sepolia/BaalAndVaultSummoner_Proxy.json new file mode 100644 index 0000000..103dfa2 --- /dev/null +++ b/deployments/sepolia/BaalAndVaultSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "transactionIndex": 24, + "gasUsed": "335695", + "logsBloom": "0x00000000000100000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000004000020000000000000000000800000000080000000000000000000000400000000000200000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000000000000001000000000000000020000000000000000000040000000000000000000000000000010020000000200000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05", + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "logs": [ + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f8e5e3b80393aef6a3fb9c3dba24ec4233a477de" + ], + "data": "0x", + "logIndex": 15, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + }, + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 16, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + }, + { + "transactionIndex": 24, + "blockNumber": 4816775, + "transactionHash": "0x93cb86efb3e9f57fa881cea0a93896282363865aa66de002304573869e4573fb", + "address": "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 17, + "blockHash": "0x3bd136a1c4912d967ffc235e9b32c6ece4a08cd4094e1f2e391e1670c0f6ea05" + } + ], + "blockNumber": 4816775, + "cumulativeGasUsed": "3003865", + "status": 1, + "byzantium": true + }, + "args": [ + "0xF8E5E3b80393AeF6a3Fb9C3DbA24ec4233A477De", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalSummoner.json b/deployments/sepolia/BaalSummoner.json new file mode 100644 index 0000000..19989f5 --- /dev/null +++ b/deployments/sepolia/BaalSummoner.json @@ -0,0 +1,666 @@ +{ + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "DaoReferral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "baalSafe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "moduleAddr", + "type": "address" + } + ], + "name": "DeployBaalSafe", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "SetAddrsVersion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "loot", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "shares", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "forwarder", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "existingAddrs", + "type": "uint256" + } + ], + "name": "SummonBaal", + "type": "event" + }, + { + "inputs": [], + "name": "addrsVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_moduleAddr", + "type": "address" + } + ], + "name": "deployAndSetupSafe", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "deployTokens", + "outputs": [ + { + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisFallbackLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisMultisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_template", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisFallbackLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisMultisendLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSafeProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_moduleProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_lootSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_sharesSingleton", + "type": "address" + } + ], + "name": "setAddrs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharesSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "summonBaal", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "template", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "transactionIndex": 27, + "gasUsed": "333576", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001020000000000000000000000000000080000020000000000000000000800000000020000000000000000000000400000200000000000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040040000000000000000000000000000020000000200000000000002000000000000000000000000000000000000000000000", + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7", + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "logs": [ + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e0f33e95af46ead1fe181d2a74919bff903cd5d4" + ], + "data": "0x", + "logIndex": 29, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + }, + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + }, + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 31, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + } + ], + "blockNumber": 4816767, + "cumulativeGasUsed": "5390384", + "status": 1, + "byzantium": true + }, + "args": [ + "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalSummoner_Implementation.json b/deployments/sepolia/BaalSummoner_Implementation.json new file mode 100644 index 0000000..8812335 --- /dev/null +++ b/deployments/sepolia/BaalSummoner_Implementation.json @@ -0,0 +1,785 @@ +{ + "address": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "daoAddress", + "type": "address" + } + ], + "name": "DaoReferral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "baalSafe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "moduleAddr", + "type": "address" + } + ], + "name": "DeployBaalSafe", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "name": "DeployBaalTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "SetAddrsVersion", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "loot", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "shares", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "forwarder", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "existingAddrs", + "type": "uint256" + } + ], + "name": "SummonBaal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "addrsVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_moduleAddr", + "type": "address" + } + ], + "name": "deployAndSetupSafe", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "deployTokens", + "outputs": [ + { + "internalType": "address", + "name": "lootToken", + "type": "address" + }, + { + "internalType": "address", + "name": "sharesToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_calls", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + } + ], + "name": "encodeMultisend", + "outputs": [ + { + "internalType": "bytes", + "name": "encodedMultisend", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisFallbackLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisMultisendLibrary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gnosisSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lootSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_template", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisFallbackLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisMultisendLibrary", + "type": "address" + }, + { + "internalType": "address", + "name": "_gnosisSafeProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_moduleProxyFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_lootSingleton", + "type": "address" + }, + { + "internalType": "address", + "name": "_sharesSingleton", + "type": "address" + } + ], + "name": "setAddrs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharesSingleton", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + } + ], + "name": "summonBaal", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initializationParams", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "initializationActions", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referrer", + "type": "bytes32" + } + ], + "name": "summonBaalFromReferrer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "template", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "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" + } + ], + "transactionHash": "0x4fe2a05a989e1391ef6b9f70f0617198e3997940d11cd5b1e922a8f2211a0e48", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "transactionIndex": 29, + "gasUsed": "2541676", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa5784341d22bf1d58d0f800f8e71edced1bbbfd5b8f3d99d1bc7b8a47f9ae150", + "transactionHash": "0x4fe2a05a989e1391ef6b9f70f0617198e3997940d11cd5b1e922a8f2211a0e48", + "logs": [], + "blockNumber": 4816766, + "cumulativeGasUsed": "5420235", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "928daf6847beb441da40e990eb20d125", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"daoAddress\",\"type\":\"address\"}],\"name\":\"DaoReferral\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"baalSafe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"moduleAddr\",\"type\":\"address\"}],\"name\":\"DeployBaalSafe\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"name\":\"DeployBaalTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"SetAddrsVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"loot\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"shares\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"existingAddrs\",\"type\":\"uint256\"}],\"name\":\"SummonBaal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addrsVersion\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_moduleAddr\",\"type\":\"address\"}],\"name\":\"deployAndSetupSafe\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"deployTokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"lootToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sharesToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_calls\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"}],\"name\":\"encodeMultisend\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedMultisend\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisFallbackLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisMultisendLibrary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gnosisSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lootSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_template\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisSingleton\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisFallbackLibrary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisMultisendLibrary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gnosisSafeProxyFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_moduleProxyFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_lootSingleton\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sharesSingleton\",\"type\":\"address\"}],\"name\":\"setAddrs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharesSingleton\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"}],\"name\":\"summonBaal\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initializationParams\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"initializationActions\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"_saltNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"referrer\",\"type\":\"bytes32\"}],\"name\":\"summonBaalFromReferrer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"template\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BaalSummoner.sol\":\"BaalSummoner\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\\n/// @author Richard Meissner - \\ninterface IProxy {\\n function masterCopy() external view returns (address);\\n}\\n\\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafeProxy {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\\n address internal singleton;\\n\\n /// @dev Constructor function sets address of singleton contract.\\n /// @param _singleton Singleton address.\\n constructor(address _singleton) {\\n require(_singleton != address(0), \\\"Invalid singleton address provided\\\");\\n singleton = _singleton;\\n }\\n\\n /// @dev Fallback function forwards all transactions and returns all received return data.\\n fallback() external payable {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\\n // 0xa619486e == keccak(\\\"masterCopy()\\\"). The value is right padded to 32-bytes with 0s\\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\\n mstore(0, _singleton)\\n return(0, 0x20)\\n }\\n calldatacopy(0, 0, calldatasize())\\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if eq(success, 0) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3bfdd453d9f896f7029d15bcafd11886957b320ad1764309d9f74fa059715249\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./GnosisSafeProxy.sol\\\";\\nimport \\\"./IProxyCreationCallback.sol\\\";\\n\\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n/// @author Stefan George - \\ncontract GnosisSafeProxyFactory {\\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param singleton Address of singleton contract.\\n /// @param data Payload for message call sent to new proxy contract.\\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\\n proxy = new GnosisSafeProxy(singleton);\\n if (data.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, singleton);\\n }\\n\\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\\n function proxyRuntimeCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).runtimeCode;\\n }\\n\\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\\n function proxyCreationCode() public pure returns (bytes memory) {\\n return type(GnosisSafeProxy).creationCode;\\n }\\n\\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\\n /// This method is only meant as an utility to be called from other methods\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function deployProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) internal returns (GnosisSafeProxy proxy) {\\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\\n }\\n require(address(proxy) != address(0), \\\"Create2 call failed\\\");\\n }\\n\\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function createProxyWithNonce(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n if (initializer.length > 0)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\\n revert(0, 0)\\n }\\n }\\n emit ProxyCreation(proxy, _singleton);\\n }\\n\\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\\n function createProxyWithCallback(\\n address _singleton,\\n bytes memory initializer,\\n uint256 saltNonce,\\n IProxyCreationCallback callback\\n ) public returns (GnosisSafeProxy proxy) {\\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\\n }\\n\\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\\n /// @param _singleton Address of singleton contract.\\n /// @param initializer Payload for message call sent to new proxy contract.\\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\\n function calculateCreateProxyWithNonceAddress(\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external returns (GnosisSafeProxy proxy) {\\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\\n revert(string(abi.encodePacked(proxy)));\\n }\\n}\\n\",\"keccak256\":\"0x187c6f84c71b432da6721c1b81cebfbb9c37c0cc15ebd8de5a14ff7ec6db2d9e\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"./GnosisSafeProxy.sol\\\";\\n\\ninterface IProxyCreationCallback {\\n function proxyCreated(\\n GnosisSafeProxy proxy,\\n address _singleton,\\n bytes calldata initializer,\\n uint256 saltNonce\\n ) external;\\n}\\n\",\"keccak256\":\"0x51a9ce914a6a943651c803541e44218a7ed0a2f98a94d55df66b173b5a11e365\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\ncontract ModuleProxyFactory {\\n event ModuleProxyCreation(\\n address indexed proxy,\\n address indexed masterCopy\\n );\\n\\n /// `target` can not be zero.\\n error ZeroAddress(address target);\\n\\n /// `target` has no code deployed.\\n error TargetHasNoCode(address target);\\n\\n /// `address_` is already taken.\\n error TakenAddress(address address_);\\n\\n /// @notice Initialization failed.\\n error FailedInitialization();\\n\\n function createProxy(address target, bytes32 salt)\\n internal\\n returns (address result)\\n {\\n if (address(target) == address(0)) revert ZeroAddress(target);\\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\\n bytes memory deployment = abi.encodePacked(\\n hex\\\"602d8060093d393df3363d3d373d3d3d363d73\\\",\\n target,\\n hex\\\"5af43d82803e903d91602b57fd5bf3\\\"\\n );\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\\n }\\n if (result == address(0)) revert TakenAddress(result);\\n }\\n\\n function deployModule(\\n address masterCopy,\\n bytes memory initializer,\\n uint256 saltNonce\\n ) public returns (address proxy) {\\n proxy = createProxy(\\n masterCopy,\\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\\n );\\n (bool success, ) = proxy.call(initializer);\\n if (!success) revert FailedInitialization();\\n\\n emit ModuleProxyCreation(proxy, masterCopy);\\n }\\n}\\n\",\"keccak256\":\"0x40a3eb64fec76f1f77656a77b4c469b299f2d8b0523ed0f207d3879455c06a70\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overridden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd5c50c54bf02740ebd122ff06832546cb5fa84486d52695a9ccfd11666e0c81d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/BaalSummoner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\\\";\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\n\\nimport \\\"./Baal.sol\\\";\\n\\ncontract BaalSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\\n // when some of the init addresses are updated\\n uint256 public addrsVersion;\\n\\n address payable public template; // fixed template for baal using eip-1167 proxy pattern\\n\\n // Template contract to use for new Gnosis safe proxies\\n address public gnosisSingleton;\\n\\n // Library to use for EIP1271 compatability\\n address public gnosisFallbackLibrary;\\n\\n // Library to use for all safe transaction executions\\n address public gnosisMultisendLibrary;\\n\\n // template contract to clone for loot ERC20 token\\n address public lootSingleton;\\n\\n // template contract to clone for shares ERC20 token\\n address public sharesSingleton;\\n\\n // Proxy summoners\\n //\\n GnosisSafeProxyFactory gnosisSafeProxyFactory;\\n ModuleProxyFactory moduleProxyFactory;\\n\\n event SetAddrsVersion(\\n uint256 version\\n );\\n\\n event SummonBaal(\\n address indexed baal,\\n address indexed loot,\\n address indexed shares,\\n address safe,\\n address forwarder,\\n uint256 existingAddrs\\n );\\n\\n event DaoReferral(\\n bytes32 referrer,\\n address daoAddress\\n );\\n\\n event DeployBaalTokens(\\n address lootToken, \\n address sharesToken\\n );\\n\\n event DeployBaalSafe(\\n address baalSafe,\\n address moduleAddr\\n );\\n\\n function initialize() initializer public {\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n // must be called after deploy to set libraries\\n function setAddrs(\\n address payable _template,\\n address _gnosisSingleton,\\n address _gnosisFallbackLibrary,\\n address _gnosisMultisendLibrary,\\n address _gnosisSafeProxyFactory,\\n address _moduleProxyFactory,\\n address _lootSingleton,\\n address _sharesSingleton\\n ) public onlyOwner {\\n require(_lootSingleton != address(0), \\\"!lootSingleton\\\");\\n require(_sharesSingleton != address(0), \\\"!sharesSingleton\\\");\\n require(_gnosisSingleton != address(0), \\\"!gnosisSingleton\\\");\\n require(_gnosisFallbackLibrary != address(0), '!gnosisFallbackLibrary');\\n require(_gnosisMultisendLibrary != address(0), '!gnosisMultisendLibrary');\\n require(_gnosisSafeProxyFactory != address(0), '!gnosisSafeProxyFactory');\\n require(_moduleProxyFactory != address(0), '!moduleProxyFactory');\\n\\n template = _template;\\n gnosisSingleton = _gnosisSingleton;\\n gnosisFallbackLibrary = _gnosisFallbackLibrary;\\n gnosisMultisendLibrary = _gnosisMultisendLibrary;\\n gnosisSafeProxyFactory = GnosisSafeProxyFactory(_gnosisSafeProxyFactory);\\n moduleProxyFactory = ModuleProxyFactory(_moduleProxyFactory);\\n lootSingleton = _lootSingleton;\\n sharesSingleton = _sharesSingleton;\\n\\n emit SetAddrsVersion(\\n addrsVersion++\\n );\\n \\n }\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n public\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n function summonBaal(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce\\n ) external returns (address) {\\n \\n return\\n _summonBaal(\\n initializationParams,\\n initializationActions,\\n _saltNonce\\n );\\n }\\n\\n // Add a referrer to help keep track of where deploies are coming from\\n function summonBaalFromReferrer(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce,\\n bytes32 referrer\\n ) external payable returns (address) {\\n address daoAddress;\\n\\n daoAddress = _summonBaal(\\n initializationParams,\\n initializationActions,\\n _saltNonce\\n );\\n\\n emit DaoReferral(referrer, daoAddress);\\n return daoAddress;\\n }\\n\\n // deploy new share and loot contracts\\n function deployTokens(string memory _name, string memory _symbol) \\n public \\n returns (address lootToken, address sharesToken) \\n {\\n lootToken = address(new ERC1967Proxy(\\n lootSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(lootSingleton).setUp.selector, \\n string(abi.encodePacked(_name, \\\" LOOT\\\")), \\n string(abi.encodePacked(_symbol, \\\"-LOOT\\\")))\\n ));\\n\\n sharesToken = address(new ERC1967Proxy(\\n sharesSingleton,\\n abi.encodeWithSelector(\\n IBaalToken(sharesSingleton).setUp.selector, \\n _name, \\n _symbol)\\n ));\\n\\n emit DeployBaalTokens(lootToken, sharesToken);\\n\\n }\\n\\n // deploy a safe with module and single module signer setup\\n function deployAndSetupSafe(address _moduleAddr)\\n public\\n returns (address)\\n {\\n // Deploy new safe but do not set it up yet\\n GnosisSafe _safe = GnosisSafe(\\n payable(\\n gnosisSafeProxyFactory.createProxy(\\n gnosisSingleton,\\n bytes(\\\"\\\")\\n )\\n )\\n );\\n // Generate delegate calls so the safe calls enableModule on itself during setup\\n bytes memory _enableBaal = abi.encodeWithSignature(\\n \\\"enableModule(address)\\\",\\n address(_moduleAddr)\\n );\\n bytes memory _enableBaalMultisend = abi.encodePacked(\\n uint8(0),\\n address(_safe),\\n uint256(0),\\n uint256(_enableBaal.length),\\n bytes(_enableBaal)\\n );\\n\\n bytes memory _multisendAction = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n _enableBaalMultisend\\n );\\n\\n // Workaround for solidity dynamic memory array\\n address[] memory _owners = new address[](1);\\n _owners[0] = address(_moduleAddr);\\n\\n // Call setup on safe to enable our new module and set the module as the only signer\\n _safe.setup(\\n _owners,\\n 1,\\n gnosisMultisendLibrary,\\n _multisendAction,\\n gnosisFallbackLibrary,\\n address(0),\\n 0,\\n payable(address(0))\\n );\\n\\n emit DeployBaalSafe(address(_safe), address(_moduleAddr));\\n\\n return address(_safe);\\n }\\n\\n // advanced summon baal with different configurations\\n // name and symbol can be blank if bringing own baal tokens\\n // zero address for either loot or shares token will summon new ones\\n // if bringing own tokens the ownership must be transfered to the new DAO\\n // zero address for Safe with summon and setup a new Safe\\n // if bringing existing safe the new dao must be enabled as a module\\n // todo: add a simple summon that just creates a dao with a single summoner\\n function _summonBaal(\\n bytes calldata initializationParams,\\n bytes[] calldata initializationActions,\\n uint256 _saltNonce\\n ) internal returns (address) {\\n uint256 existingAddrs; // 1 tokens, 2 safe, 3 both\\n (\\n string memory _name, /*_name Name for erc20 `shares` accounting, empty if token */\\n string memory _symbol, /*_symbol Symbol for erc20 `shares` accounting, empty if token*/\\n address _safeAddr, /*address of safe, 0 addr if new*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771), 0 addr if initially disabled*/\\n address _lootToken, /*predeployed loot token, 0 addr if new*/\\n address _sharesToken /*predeployed shares token, 0 addr if new*/\\n ) = abi.decode(initializationParams, (string, string, address, address, address, address));\\n\\n Baal _baal = Baal(\\n moduleProxyFactory.deployModule(\\n template, \\n abi.encodeWithSignature(\\\"avatar()\\\"), \\n _saltNonce\\n )\\n );\\n\\n // if loot or shares are zero address new tokens are deployed\\n // tokens need to be baalTokens\\n if(_lootToken == address(0) || _sharesToken == address(0)){\\n (_lootToken, _sharesToken) = deployTokens(_name, _symbol);\\n // pause tokens by default and transfer to the DAO\\n IBaalToken(_lootToken).pause();\\n IBaalToken(_sharesToken).pause();\\n IBaalToken(_lootToken).transferOwnership(address(_baal));\\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\\n } else {\\n existingAddrs += 1;\\n }\\n\\n // if zero address deploy a new safe\\n // Needs to be a valid zodiac treasury\\n if(_safeAddr == address(0)){\\n _safeAddr = deployAndSetupSafe(address(_baal));\\n } else {\\n existingAddrs += 2;\\n }\\n\\n bytes memory _initializationMultisendData = encodeMultisend(\\n initializationActions,\\n address(_baal)\\n );\\n bytes memory _initializer = abi.encode(\\n _lootToken,\\n _sharesToken,\\n gnosisMultisendLibrary,\\n _safeAddr,\\n _forwarder,\\n _initializationMultisendData\\n );\\n // can run the actions now because we have a baal\\n _baal.setUp(_initializer);\\n\\n emit SummonBaal(\\n address(_baal),\\n address(_baal.lootToken()),\\n address(_baal.sharesToken()),\\n _safeAddr,\\n _forwarder,\\n existingAddrs\\n );\\n\\n return (address(_baal));\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n onlyOwner\\n override\\n {}\\n}\\n\",\"keccak256\":\"0x4053036af806c618440986e05da32008fd83cfee2e631fd3bed8b581045ee913\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b50608051612d2161004c60003960008181610483015281816104cf01528181610593015281816105d601526106720152612d216000f3fe608060405260043610620001375760003560e01c8063881e4ea411620000ad578063d9118ce7116200006c578063d9118ce71462000364578063ebfb8a431462000386578063f0fa28b914620003ab578063f2fde38b14620003cd578063f884231c14620003f257600080fd5b8063881e4ea414620002865780638da5cb5b14620002a857806397fc9fbb14620002c8578063a2346618146200030e578063d61f27ae146200033057600080fd5b80634f1ef28611620000fa5780634f1ef286146200020557806352d1902d146200021c5780636f2ddd931462000234578063715018a614620002565780638129fc1c146200026e57600080fd5b8063209f3695146200013c57806321d56a43146200017057806323626b4514620001925780633659cfe614620001b95780634a8b0b3214620001e0575b600080fd5b620001536200014d36600462001b6e565b62000417565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156200017d57600080fd5b5060cb5462000153906001600160a01b031681565b3480156200019f57600080fd5b50620001aa60c95481565b60405190815260200162000167565b348015620001c657600080fd5b50620001de620001d836600462001c09565b62000478565b005b348015620001ed57600080fd5b5062000153620001ff36600462001c29565b6200056d565b620001de6200021636600462001d65565b62000588565b3480156200022957600080fd5b50620001aa62000665565b3480156200024157600080fd5b5060ca5462000153906001600160a01b031681565b3480156200026357600080fd5b50620001de6200071b565b3480156200027b57600080fd5b50620001de62000733565b3480156200029357600080fd5b5060cd5462000153906001600160a01b031681565b348015620002b557600080fd5b506033546001600160a01b031662000153565b348015620002d557600080fd5b50620002ed620002e736600462001dbb565b62000856565b604080516001600160a01b0393841681529290911660208301520162000167565b3480156200031b57600080fd5b5060cf5462000153906001600160a01b031681565b3480156200033d57600080fd5b50620003556200034f36600462001eac565b62000a17565b60405162000167919062001f76565b3480156200037157600080fd5b5060ce5462000153906001600160a01b031681565b3480156200039357600080fd5b50620001de620003a536600462001f8b565b62000aec565b348015620003b857600080fd5b5060cc5462000153906001600160a01b031681565b348015620003da57600080fd5b50620001de620003ec36600462001c09565b62000df0565b348015620003ff57600080fd5b50620001536200041136600462001c09565b62000e6c565b600080620004298888888888620010c4565b604080518581526001600160a01b03831660208201529192507fe1e7ecd08b1e119c2755872e95180d0d070137a7c2af361de1d7256bc3674107910160405180910390a1979650505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620004cd5760405162461bcd60e51b8152600401620004c49062002045565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200051860008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620005415760405162461bcd60e51b8152600401620004c49062002091565b6200054c81620015a4565b604080516000808252602082019092526200056a91839190620015ae565b50565b60006200057e8686868686620010c4565b9695505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005d45760405162461bcd60e51b8152600401620004c49062002045565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200061f60008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620006485760405162461bcd60e51b8152600401620004c49062002091565b6200065382620015a4565b6200066182826001620015ae565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007075760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620004c4565b5060008051602062002ca583398151915290565b620007256200172b565b62000731600062001787565b565b600054610100900460ff1615808015620007545750600054600160ff909116105b80620007705750303b15801562000770575060005460ff166001145b620007d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620004c4565b6000805460ff191660011790558015620007f9576000805461ff0019166101001790555b62000803620017d9565b6200080d6200180d565b80156200056a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60ce5460405160009182916001600160a01b039091169063562d190d60e01b9062000886908790602001620020dd565b60405160208183030381529060405285604051602001620008a8919062002108565b60408051601f1981840301815290829052620008c8929160240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620009079062001acc565b620009149291906200215c565b604051809103906000f08015801562000931573d6000803e3d6000fd5b5060cf546040519193506001600160a01b03169063562d190d60e01b9062000960908790879060240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516200099f9062001acc565b620009ac9291906200215c565b604051809103906000f080158015620009c9573d6000803e3d6000fd5b50604080516001600160a01b038086168252831660208201529192507ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a19250929050565b60608060005b845181101562000aa65781600085600088858151811062000a425762000a426200218a565b60200260200101515189868151811062000a605762000a606200218a565b602002602001015160405160200162000a7f96959493929190620021a0565b6040516020818303038152906040529150808062000a9d9062002224565b91505062000a1d565b508060405160240162000aba919062001f76565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b62000af66200172b565b6001600160a01b03821662000b3f5760405162461bcd60e51b815260206004820152600e60248201526d10b637b7ba29b4b733b632ba37b760911b6044820152606401620004c4565b6001600160a01b03811662000b8a5760405162461bcd60e51b815260206004820152601060248201526f10b9b430b932b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03871662000bd55760405162461bcd60e51b815260206004820152601060248201526f10b3b737b9b4b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03861662000c265760405162461bcd60e51b815260206004820152601660248201527521676e6f73697346616c6c6261636b4c69627261727960501b6044820152606401620004c4565b6001600160a01b03851662000c7e5760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369734d756c746973656e644c6962726172790000000000000000006044820152606401620004c4565b6001600160a01b03841662000cd65760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369735361666550726f7879466163746f72790000000000000000006044820152606401620004c4565b6001600160a01b03831662000d245760405162461bcd60e51b8152602060048201526013602482015272216d6f64756c6550726f7879466163746f727960681b6044820152606401620004c4565b60ca80546001600160a01b03199081166001600160a01b038b81169190911790925560cb805482168a841617905560cc8054821689841617905560cd8054821688841617905560d08054821687841617905560d18054821686841617905560ce8054821685841617905560cf805490911691831691909117905560c980547fe6fb5c8c5a2615df9d8de2df2fdebdae949bcf3a2a80cb8ff90ace3459de85cc91600062000dd18362002224565b9091555060405190815260200160405180910390a15050505050505050565b62000dfa6200172b565b6001600160a01b03811662000e615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620004c4565b6200056a8162001787565b60d05460cb5460408051602081018252600080825291516361b69abd60e01b8152919384936001600160a01b03918216936361b69abd9362000eb69390921691906004016200215c565b6020604051808303816000875af115801562000ed6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efc919062002242565b6040516001600160a01b038516602482015290915060009060440160408051601f19818403018152918152602080830180516001600160e01b031663610b592560e01b1790528251915192935060009262000f61928492879284929188910162002262565b604051602081830303815290604052905060008160405160240162000f87919062001f76565b60408051601f19818403018152918152602080830180516001600160e01b03166346c07f8560e11b1790528151600180825281840190935292935060009291908281019080368337019050509050868160008151811062000fec5762000fec6200218a565b6001600160a01b03928316602091820292909201015260cd5460cc5460405163b63e800d60e01b81528884169363b63e800d9362001041938793600193928316928a92169060009081908190600401620022ba565b600060405180830381600087803b1580156200105c57600080fd5b505af115801562001071573d6000803e3d6000fd5b5050604080516001600160a01b03808a1682528b1660208201527f7ad675e6593a2c3bdf52607876353caf39853572dd787d2a5eed1cc99097b3f0935001905060405180910390a1509295945050505050565b600080808080808080620010db8c8e018e6200237c565b955095509550955095509550600060d160009054906101000a90046001600160a01b03166001600160a01b031663f1ab873c60ca60009054906101000a90046001600160a01b0316604051602401604051602081830303815290604052632d77bef360e11b6001600160e01b0319166020820180516001600160e01b0383818316178352505050508d6040518463ffffffff1660e01b815260040162001184939291906200243a565b6020604051808303816000875af1158015620011a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011ca919062002242565b90506001600160a01b0383161580620011ea57506001600160a01b038216155b156200136e57620011fc878762000856565b8093508194505050826001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200124057600080fd5b505af115801562001255573d6000803e3d6000fd5b50505050816001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200129557600080fd5b505af1158015620012aa573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528616925063f2fde38b9150602401600060405180830381600087803b158015620012f257600080fd5b505af115801562001307573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b1580156200134f57600080fd5b505af115801562001364573d6000803e3d6000fd5b505050506200137e565b6200137b60018962002470565b97505b6001600160a01b038516620013a057620013988162000e6c565b9450620013b0565b620013ad60028962002470565b97505b6000620013c9620013c28d8f6200248b565b8362000a17565b60cd54604051919250600091620013f791879187916001600160a01b0316908b908b9088906020016200249a565b60408051601f198184030181529082905263a4f9edbf60e01b825291506001600160a01b0384169063a4f9edbf906200143590849060040162001f76565b600060405180830381600087803b1580156200145057600080fd5b505af115801562001465573d6000803e3d6000fd5b50505050826001600160a01b0316638009ba1f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014ce919062002242565b6001600160a01b0316836001600160a01b031663f460124d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001516573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200153c919062002242565b604080516001600160a01b038b811682528a811660208301529181018e905291811691908616907fcf2f09cd0dbc149b12a3630a11b7d73476660f3d08d3dc7dcc79c6dec555ee7a9060600160405180910390a450909e9d5050505050505050505050505050565b6200056a6200172b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615620015e957620015e48362001837565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562001646575060408051601f3d908101601f191682019092526200164391810190620024ec565b60015b620016ab5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620004c4565b60008051602062002ca583398151915281146200171d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620004c4565b50620015e4838383620018d6565b6033546001600160a01b03163314620007315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620004c4565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620018035760405162461bcd60e51b8152600401620004c49062002506565b6200073162001907565b600054610100900460ff16620007315760405162461bcd60e51b8152600401620004c49062002506565b6001600160a01b0381163b620018a65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620004c4565b60008051602062002ca583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620018e1836200193c565b600082511180620018ef5750805b15620015e4576200190183836200197e565b50505050565b600054610100900460ff16620019315760405162461bcd60e51b8152600401620004c49062002506565b620007313362001787565b620019478162001837565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620019e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620004c4565b600080846001600160a01b03168460405162001a05919062002551565b600060405180830381855af49150503d806000811462001a42576040519150601f19603f3d011682016040523d82523d6000602084013e62001a47565b606091505b509150915062001a72828260405180606001604052806027815260200162002cc56027913962001a7b565b95945050505050565b6060831562001a8c57508162001a98565b62001a98838362001a9f565b9392505050565b81511562001ab05781518083602001fd5b8060405162461bcd60e51b8152600401620004c4919062001f76565b610735806200257083390190565b60008083601f84011262001aed57600080fd5b50813567ffffffffffffffff81111562001b0657600080fd5b60208301915083602082850101111562001b1f57600080fd5b9250929050565b60008083601f84011262001b3957600080fd5b50813567ffffffffffffffff81111562001b5257600080fd5b6020830191508360208260051b850101111562001b1f57600080fd5b6000806000806000806080878903121562001b8857600080fd5b863567ffffffffffffffff8082111562001ba157600080fd5b62001baf8a838b0162001ada565b9098509650602089013591508082111562001bc957600080fd5b5062001bd889828a0162001b26565b979a9699509760408101359660609091013595509350505050565b6001600160a01b03811681146200056a57600080fd5b60006020828403121562001c1c57600080fd5b813562001a988162001bf3565b60008060008060006060868803121562001c4257600080fd5b853567ffffffffffffffff8082111562001c5b57600080fd5b62001c6989838a0162001ada565b9097509550602088013591508082111562001c8357600080fd5b5062001c928882890162001b26565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001ce65762001ce662001ca4565b604052919050565b600082601f83011262001d0057600080fd5b813567ffffffffffffffff81111562001d1d5762001d1d62001ca4565b62001d32601f8201601f191660200162001cba565b81815284602083860101111562001d4857600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121562001d7957600080fd5b823562001d868162001bf3565b9150602083013567ffffffffffffffff81111562001da357600080fd5b62001db18582860162001cee565b9150509250929050565b6000806040838503121562001dcf57600080fd5b823567ffffffffffffffff8082111562001de857600080fd5b62001df68683870162001cee565b9350602085013591508082111562001e0d57600080fd5b5062001db18582860162001cee565b600067ffffffffffffffff8084111562001e3a5762001e3a62001ca4565b8360051b602062001e4d81830162001cba565b8681529350908401908084018783111562001e6757600080fd5b855b8381101562001ea05780358581111562001e835760008081fd5b62001e918a828a0162001cee565b83525090820190820162001e69565b50505050509392505050565b6000806040838503121562001ec057600080fd5b823567ffffffffffffffff81111562001ed857600080fd5b8301601f8101851362001eea57600080fd5b62001efb8582356020840162001e1c565b925050602083013562001f0e8162001bf3565b809150509250929050565b60005b8381101562001f3657818101518382015260200162001f1c565b83811115620019015750506000910152565b6000815180845262001f6281602086016020860162001f19565b601f01601f19169290920160200192915050565b60208152600062001a98602083018462001f48565b600080600080600080600080610100898b03121562001fa957600080fd5b883562001fb68162001bf3565b9750602089013562001fc88162001bf3565b9650604089013562001fda8162001bf3565b9550606089013562001fec8162001bf3565b9450608089013562001ffe8162001bf3565b935060a0890135620020108162001bf3565b925060c0890135620020228162001bf3565b915060e0890135620020348162001bf3565b809150509295985092959890939650565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008251620020f181846020870162001f19565b64081313d3d560da1b920191825250600501919050565b600082516200211c81846020870162001f19565b640b5313d3d560da1b920191825250600501919050565b60408152600062002148604083018562001f48565b828103602084015262001a72818562001f48565b6001600160a01b0383168152604060208201819052600090620021829083018462001f48565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60008751620021b4818460208c0162001f19565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351620021fe81605584016020880162001f19565b0160550198975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156200223b576200223b6200220e565b5060010190565b6000602082840312156200225557600080fd5b815162001a988162001bf3565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251620022a981605585016020870162001f19565b919091016055019695505050505050565b6101008082528951908201819052600090610120830190602090818d01845b82811015620023005781516001600160a01b031685529383019390830190600101620022d9565b50505083018a90526001600160a01b038916604084015282810360608401526200232b818962001f48565b9150506200234460808301876001600160a01b03169052565b6001600160a01b03851660a08301528360c08301526200236f60e08301846001600160a01b03169052565b9998505050505050505050565b60008060008060008060c087890312156200239657600080fd5b863567ffffffffffffffff80821115620023af57600080fd5b620023bd8a838b0162001cee565b97506020890135915080821115620023d457600080fd5b50620023e389828a0162001cee565b9550506040870135620023f68162001bf3565b93506060870135620024088162001bf3565b925060808701356200241a8162001bf3565b915060a08701356200242c8162001bf3565b809150509295509295509295565b6001600160a01b0384168152606060208201819052600090620024609083018562001f48565b9050826040830152949350505050565b600082198211156200248657620024866200220e565b500190565b600062001a9836848462001e1c565b6001600160a01b0387811682528681166020830152858116604083015284811660608301528316608082015260c060a08201819052600090620024e09083018462001f48565b98975050505050505050565b600060208284031215620024ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516200256581846020870162001f19565b919091019291505056fe60806040526040516107353803806107358339810160408190526100229161031e565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ec565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b81526004016101489190610408565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561030d5781810151838201526020016102f5565b838111156100645750506000910152565b6000806040838503121561033157600080fd5b82516001600160a01b038116811461034857600080fd5b60208401519092506001600160401b038082111561036557600080fd5b818501915085601f83011261037957600080fd5b81518181111561038b5761038b6102dc565b604051601f8201601f19908116603f011681019083821181831017156103b3576103b36102dc565b816040528281528860208487010111156103cc57600080fd5b6103dd8360208301602088016102f2565b80955050505050509250929050565b600082516103fe8184602087016102f2565b9190910192915050565b60208152600082518060208401526104278160408501602087016102f2565b601f01601f19169190910160400192915050565b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207412a0b3e226211217f19a3b0db835079d54492e8c6a40cf0ec680c2ad3f06ee64736f6c634300080a0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bc2877b2a93adc52a277122972e8c6137b7c0334e3648c825f4d4baaefb717c364736f6c634300080a0033", + "deployedBytecode": "0x608060405260043610620001375760003560e01c8063881e4ea411620000ad578063d9118ce7116200006c578063d9118ce71462000364578063ebfb8a431462000386578063f0fa28b914620003ab578063f2fde38b14620003cd578063f884231c14620003f257600080fd5b8063881e4ea414620002865780638da5cb5b14620002a857806397fc9fbb14620002c8578063a2346618146200030e578063d61f27ae146200033057600080fd5b80634f1ef28611620000fa5780634f1ef286146200020557806352d1902d146200021c5780636f2ddd931462000234578063715018a614620002565780638129fc1c146200026e57600080fd5b8063209f3695146200013c57806321d56a43146200017057806323626b4514620001925780633659cfe614620001b95780634a8b0b3214620001e0575b600080fd5b620001536200014d36600462001b6e565b62000417565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156200017d57600080fd5b5060cb5462000153906001600160a01b031681565b3480156200019f57600080fd5b50620001aa60c95481565b60405190815260200162000167565b348015620001c657600080fd5b50620001de620001d836600462001c09565b62000478565b005b348015620001ed57600080fd5b5062000153620001ff36600462001c29565b6200056d565b620001de6200021636600462001d65565b62000588565b3480156200022957600080fd5b50620001aa62000665565b3480156200024157600080fd5b5060ca5462000153906001600160a01b031681565b3480156200026357600080fd5b50620001de6200071b565b3480156200027b57600080fd5b50620001de62000733565b3480156200029357600080fd5b5060cd5462000153906001600160a01b031681565b348015620002b557600080fd5b506033546001600160a01b031662000153565b348015620002d557600080fd5b50620002ed620002e736600462001dbb565b62000856565b604080516001600160a01b0393841681529290911660208301520162000167565b3480156200031b57600080fd5b5060cf5462000153906001600160a01b031681565b3480156200033d57600080fd5b50620003556200034f36600462001eac565b62000a17565b60405162000167919062001f76565b3480156200037157600080fd5b5060ce5462000153906001600160a01b031681565b3480156200039357600080fd5b50620001de620003a536600462001f8b565b62000aec565b348015620003b857600080fd5b5060cc5462000153906001600160a01b031681565b348015620003da57600080fd5b50620001de620003ec36600462001c09565b62000df0565b348015620003ff57600080fd5b50620001536200041136600462001c09565b62000e6c565b600080620004298888888888620010c4565b604080518581526001600160a01b03831660208201529192507fe1e7ecd08b1e119c2755872e95180d0d070137a7c2af361de1d7256bc3674107910160405180910390a1979650505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620004cd5760405162461bcd60e51b8152600401620004c49062002045565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200051860008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620005415760405162461bcd60e51b8152600401620004c49062002091565b6200054c81620015a4565b604080516000808252602082019092526200056a91839190620015ae565b50565b60006200057e8686868686620010c4565b9695505050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415620005d45760405162461bcd60e51b8152600401620004c49062002045565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166200061f60008051602062002ca5833981519152546001600160a01b031690565b6001600160a01b031614620006485760405162461bcd60e51b8152600401620004c49062002091565b6200065382620015a4565b6200066182826001620015ae565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614620007075760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401620004c4565b5060008051602062002ca583398151915290565b620007256200172b565b62000731600062001787565b565b600054610100900460ff1615808015620007545750600054600160ff909116105b80620007705750303b15801562000770575060005460ff166001145b620007d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620004c4565b6000805460ff191660011790558015620007f9576000805461ff0019166101001790555b62000803620017d9565b6200080d6200180d565b80156200056a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60ce5460405160009182916001600160a01b039091169063562d190d60e01b9062000886908790602001620020dd565b60405160208183030381529060405285604051602001620008a8919062002108565b60408051601f1981840301815290829052620008c8929160240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620009079062001acc565b620009149291906200215c565b604051809103906000f08015801562000931573d6000803e3d6000fd5b5060cf546040519193506001600160a01b03169063562d190d60e01b9062000960908790879060240162002133565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516200099f9062001acc565b620009ac9291906200215c565b604051809103906000f080158015620009c9573d6000803e3d6000fd5b50604080516001600160a01b038086168252831660208201529192507ffb5849d45e916a3192059973d782e08b2b3888fa796f536d99af0c7bd01ca16c910160405180910390a19250929050565b60608060005b845181101562000aa65781600085600088858151811062000a425762000a426200218a565b60200260200101515189868151811062000a605762000a606200218a565b602002602001015160405160200162000a7f96959493929190620021a0565b6040516020818303038152906040529150808062000a9d9062002224565b91505062000a1d565b508060405160240162000aba919062001f76565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b179052949350505050565b62000af66200172b565b6001600160a01b03821662000b3f5760405162461bcd60e51b815260206004820152600e60248201526d10b637b7ba29b4b733b632ba37b760911b6044820152606401620004c4565b6001600160a01b03811662000b8a5760405162461bcd60e51b815260206004820152601060248201526f10b9b430b932b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03871662000bd55760405162461bcd60e51b815260206004820152601060248201526f10b3b737b9b4b9a9b4b733b632ba37b760811b6044820152606401620004c4565b6001600160a01b03861662000c265760405162461bcd60e51b815260206004820152601660248201527521676e6f73697346616c6c6261636b4c69627261727960501b6044820152606401620004c4565b6001600160a01b03851662000c7e5760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369734d756c746973656e644c6962726172790000000000000000006044820152606401620004c4565b6001600160a01b03841662000cd65760405162461bcd60e51b815260206004820152601760248201527f21676e6f7369735361666550726f7879466163746f72790000000000000000006044820152606401620004c4565b6001600160a01b03831662000d245760405162461bcd60e51b8152602060048201526013602482015272216d6f64756c6550726f7879466163746f727960681b6044820152606401620004c4565b60ca80546001600160a01b03199081166001600160a01b038b81169190911790925560cb805482168a841617905560cc8054821689841617905560cd8054821688841617905560d08054821687841617905560d18054821686841617905560ce8054821685841617905560cf805490911691831691909117905560c980547fe6fb5c8c5a2615df9d8de2df2fdebdae949bcf3a2a80cb8ff90ace3459de85cc91600062000dd18362002224565b9091555060405190815260200160405180910390a15050505050505050565b62000dfa6200172b565b6001600160a01b03811662000e615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620004c4565b6200056a8162001787565b60d05460cb5460408051602081018252600080825291516361b69abd60e01b8152919384936001600160a01b03918216936361b69abd9362000eb69390921691906004016200215c565b6020604051808303816000875af115801562000ed6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000efc919062002242565b6040516001600160a01b038516602482015290915060009060440160408051601f19818403018152918152602080830180516001600160e01b031663610b592560e01b1790528251915192935060009262000f61928492879284929188910162002262565b604051602081830303815290604052905060008160405160240162000f87919062001f76565b60408051601f19818403018152918152602080830180516001600160e01b03166346c07f8560e11b1790528151600180825281840190935292935060009291908281019080368337019050509050868160008151811062000fec5762000fec6200218a565b6001600160a01b03928316602091820292909201015260cd5460cc5460405163b63e800d60e01b81528884169363b63e800d9362001041938793600193928316928a92169060009081908190600401620022ba565b600060405180830381600087803b1580156200105c57600080fd5b505af115801562001071573d6000803e3d6000fd5b5050604080516001600160a01b03808a1682528b1660208201527f7ad675e6593a2c3bdf52607876353caf39853572dd787d2a5eed1cc99097b3f0935001905060405180910390a1509295945050505050565b600080808080808080620010db8c8e018e6200237c565b955095509550955095509550600060d160009054906101000a90046001600160a01b03166001600160a01b031663f1ab873c60ca60009054906101000a90046001600160a01b0316604051602401604051602081830303815290604052632d77bef360e11b6001600160e01b0319166020820180516001600160e01b0383818316178352505050508d6040518463ffffffff1660e01b815260040162001184939291906200243a565b6020604051808303816000875af1158015620011a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011ca919062002242565b90506001600160a01b0383161580620011ea57506001600160a01b038216155b156200136e57620011fc878762000856565b8093508194505050826001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200124057600080fd5b505af115801562001255573d6000803e3d6000fd5b50505050816001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156200129557600080fd5b505af1158015620012aa573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528616925063f2fde38b9150602401600060405180830381600087803b158015620012f257600080fd5b505af115801562001307573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0384811660048301528516925063f2fde38b9150602401600060405180830381600087803b1580156200134f57600080fd5b505af115801562001364573d6000803e3d6000fd5b505050506200137e565b6200137b60018962002470565b97505b6001600160a01b038516620013a057620013988162000e6c565b9450620013b0565b620013ad60028962002470565b97505b6000620013c9620013c28d8f6200248b565b8362000a17565b60cd54604051919250600091620013f791879187916001600160a01b0316908b908b9088906020016200249a565b60408051601f198184030181529082905263a4f9edbf60e01b825291506001600160a01b0384169063a4f9edbf906200143590849060040162001f76565b600060405180830381600087803b1580156200145057600080fd5b505af115801562001465573d6000803e3d6000fd5b50505050826001600160a01b0316638009ba1f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620014a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014ce919062002242565b6001600160a01b0316836001600160a01b031663f460124d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001516573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200153c919062002242565b604080516001600160a01b038b811682528a811660208301529181018e905291811691908616907fcf2f09cd0dbc149b12a3630a11b7d73476660f3d08d3dc7dcc79c6dec555ee7a9060600160405180910390a450909e9d5050505050505050505050505050565b6200056a6200172b565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615620015e957620015e48362001837565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801562001646575060408051601f3d908101601f191682019092526200164391810190620024ec565b60015b620016ab5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401620004c4565b60008051602062002ca583398151915281146200171d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401620004c4565b50620015e4838383620018d6565b6033546001600160a01b03163314620007315760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620004c4565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16620018035760405162461bcd60e51b8152600401620004c49062002506565b6200073162001907565b600054610100900460ff16620007315760405162461bcd60e51b8152600401620004c49062002506565b6001600160a01b0381163b620018a65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620004c4565b60008051602062002ca583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b620018e1836200193c565b600082511180620018ef5750805b15620015e4576200190183836200197e565b50505050565b600054610100900460ff16620019315760405162461bcd60e51b8152600401620004c49062002506565b620007313362001787565b620019478162001837565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b620019e85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401620004c4565b600080846001600160a01b03168460405162001a05919062002551565b600060405180830381855af49150503d806000811462001a42576040519150601f19603f3d011682016040523d82523d6000602084013e62001a47565b606091505b509150915062001a72828260405180606001604052806027815260200162002cc56027913962001a7b565b95945050505050565b6060831562001a8c57508162001a98565b62001a98838362001a9f565b9392505050565b81511562001ab05781518083602001fd5b8060405162461bcd60e51b8152600401620004c4919062001f76565b610735806200257083390190565b60008083601f84011262001aed57600080fd5b50813567ffffffffffffffff81111562001b0657600080fd5b60208301915083602082850101111562001b1f57600080fd5b9250929050565b60008083601f84011262001b3957600080fd5b50813567ffffffffffffffff81111562001b5257600080fd5b6020830191508360208260051b850101111562001b1f57600080fd5b6000806000806000806080878903121562001b8857600080fd5b863567ffffffffffffffff8082111562001ba157600080fd5b62001baf8a838b0162001ada565b9098509650602089013591508082111562001bc957600080fd5b5062001bd889828a0162001b26565b979a9699509760408101359660609091013595509350505050565b6001600160a01b03811681146200056a57600080fd5b60006020828403121562001c1c57600080fd5b813562001a988162001bf3565b60008060008060006060868803121562001c4257600080fd5b853567ffffffffffffffff8082111562001c5b57600080fd5b62001c6989838a0162001ada565b9097509550602088013591508082111562001c8357600080fd5b5062001c928882890162001b26565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001ce65762001ce662001ca4565b604052919050565b600082601f83011262001d0057600080fd5b813567ffffffffffffffff81111562001d1d5762001d1d62001ca4565b62001d32601f8201601f191660200162001cba565b81815284602083860101111562001d4857600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121562001d7957600080fd5b823562001d868162001bf3565b9150602083013567ffffffffffffffff81111562001da357600080fd5b62001db18582860162001cee565b9150509250929050565b6000806040838503121562001dcf57600080fd5b823567ffffffffffffffff8082111562001de857600080fd5b62001df68683870162001cee565b9350602085013591508082111562001e0d57600080fd5b5062001db18582860162001cee565b600067ffffffffffffffff8084111562001e3a5762001e3a62001ca4565b8360051b602062001e4d81830162001cba565b8681529350908401908084018783111562001e6757600080fd5b855b8381101562001ea05780358581111562001e835760008081fd5b62001e918a828a0162001cee565b83525090820190820162001e69565b50505050509392505050565b6000806040838503121562001ec057600080fd5b823567ffffffffffffffff81111562001ed857600080fd5b8301601f8101851362001eea57600080fd5b62001efb8582356020840162001e1c565b925050602083013562001f0e8162001bf3565b809150509250929050565b60005b8381101562001f3657818101518382015260200162001f1c565b83811115620019015750506000910152565b6000815180845262001f6281602086016020860162001f19565b601f01601f19169290920160200192915050565b60208152600062001a98602083018462001f48565b600080600080600080600080610100898b03121562001fa957600080fd5b883562001fb68162001bf3565b9750602089013562001fc88162001bf3565b9650604089013562001fda8162001bf3565b9550606089013562001fec8162001bf3565b9450608089013562001ffe8162001bf3565b935060a0890135620020108162001bf3565b925060c0890135620020228162001bf3565b915060e0890135620020348162001bf3565b809150509295985092959890939650565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008251620020f181846020870162001f19565b64081313d3d560da1b920191825250600501919050565b600082516200211c81846020870162001f19565b640b5313d3d560da1b920191825250600501919050565b60408152600062002148604083018562001f48565b828103602084015262001a72818562001f48565b6001600160a01b0383168152604060208201819052600090620021829083018462001f48565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60008751620021b4818460208c0162001f19565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351620021fe81605584016020880162001f19565b0160550198975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156200223b576200223b6200220e565b5060010190565b6000602082840312156200225557600080fd5b815162001a988162001bf3565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251620022a981605585016020870162001f19565b919091016055019695505050505050565b6101008082528951908201819052600090610120830190602090818d01845b82811015620023005781516001600160a01b031685529383019390830190600101620022d9565b50505083018a90526001600160a01b038916604084015282810360608401526200232b818962001f48565b9150506200234460808301876001600160a01b03169052565b6001600160a01b03851660a08301528360c08301526200236f60e08301846001600160a01b03169052565b9998505050505050505050565b60008060008060008060c087890312156200239657600080fd5b863567ffffffffffffffff80821115620023af57600080fd5b620023bd8a838b0162001cee565b97506020890135915080821115620023d457600080fd5b50620023e389828a0162001cee565b9550506040870135620023f68162001bf3565b93506060870135620024088162001bf3565b925060808701356200241a8162001bf3565b915060a08701356200242c8162001bf3565b809150509295509295509295565b6001600160a01b0384168152606060208201819052600090620024609083018562001f48565b9050826040830152949350505050565b600082198211156200248657620024866200220e565b500190565b600062001a9836848462001e1c565b6001600160a01b0387811682528681166020830152858116604083015284811660608301528316608082015260c060a08201819052600090620024e09083018462001f48565b98975050505050505050565b600060208284031215620024ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516200256581846020870162001f19565b919091019291505056fe60806040526040516107353803806107358339810160408190526100229161031e565b61002e82826000610035565b505061043b565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161070e602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ec565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a0578251610299576001600160a01b0385163b6102995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102aa565b6102aa83836102b2565b949350505050565b8151156102c25781518083602001fd5b8060405162461bcd60e51b81526004016101489190610408565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561030d5781810151838201526020016102f5565b838111156100645750506000910152565b6000806040838503121561033157600080fd5b82516001600160a01b038116811461034857600080fd5b60208401519092506001600160401b038082111561036557600080fd5b818501915085601f83011261037957600080fd5b81518181111561038b5761038b6102dc565b604051601f8201601f19908116603f011681019083821181831017156103b3576103b36102dc565b816040528281528860208487010111156103cc57600080fd5b6103dd8360208301602088016102f2565b80955050505050509250929050565b600082516103fe8184602087016102f2565b9190910192915050565b60208152600082518060208401526104278160408501602087016102f2565b601f01601f19169190910160400192915050565b6102c48061044a6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212207412a0b3e226211217f19a3b0db835079d54492e8c6a40cf0ec680c2ad3f06ee64736f6c634300080a0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bc2877b2a93adc52a277122972e8c6137b7c0334e3648c825f4d4baaefb717c364736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3937, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 12611, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "addrsVersion", + "offset": 0, + "slot": "201", + "type": "t_uint256" + }, + { + "astId": 12613, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "template", + "offset": 0, + "slot": "202", + "type": "t_address_payable" + }, + { + "astId": 12615, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisSingleton", + "offset": 0, + "slot": "203", + "type": "t_address" + }, + { + "astId": 12617, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisFallbackLibrary", + "offset": 0, + "slot": "204", + "type": "t_address" + }, + { + "astId": 12619, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisMultisendLibrary", + "offset": 0, + "slot": "205", + "type": "t_address" + }, + { + "astId": 12621, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "lootSingleton", + "offset": 0, + "slot": "206", + "type": "t_address" + }, + { + "astId": 12623, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "sharesSingleton", + "offset": 0, + "slot": "207", + "type": "t_address" + }, + { + "astId": 12626, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "gnosisSafeProxyFactory", + "offset": 0, + "slot": "208", + "type": "t_contract(GnosisSafeProxyFactory)3163" + }, + { + "astId": 12629, + "contract": "contracts/BaalSummoner.sol:BaalSummoner", + "label": "moduleProxyFactory", + "offset": 0, + "slot": "209", + "type": "t_contract(ModuleProxyFactory)3539" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(GnosisSafeProxyFactory)3163": { + "encoding": "inplace", + "label": "contract GnosisSafeProxyFactory", + "numberOfBytes": "20" + }, + "t_contract(ModuleProxyFactory)3539": { + "encoding": "inplace", + "label": "contract ModuleProxyFactory", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/BaalSummoner_Proxy.json b/deployments/sepolia/BaalSummoner_Proxy.json new file mode 100644 index 0000000..ea801e8 --- /dev/null +++ b/deployments/sepolia/BaalSummoner_Proxy.json @@ -0,0 +1,158 @@ +{ + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "transactionIndex": 27, + "gasUsed": "333576", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001020000000000000000000000000000080000020000000000000000000800000000020000000000000000000000400000200000000000000000000000000000004000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040040000000000000000000000000000020000000200000000000002000000000000000000000000000000000000000000000", + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7", + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "logs": [ + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e0f33e95af46ead1fe181d2a74919bff903cd5d4" + ], + "data": "0x", + "logIndex": 29, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + }, + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007c510abf45c10a9ab949ef69ccbba5d77312d814" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + }, + { + "transactionIndex": 27, + "blockNumber": 4816767, + "transactionHash": "0xd3da6276b6e9164b799b6600297ce0e829d3a1363bd4301069ef910bbf17e9fa", + "address": "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 31, + "blockHash": "0xce54b13e6bdb8530cacc9ce6fd98328c6e04d9586a140da8d9c7deb342283da7" + } + ], + "blockNumber": 4816767, + "cumulativeGasUsed": "5390384", + "status": 1, + "byzantium": true + }, + "args": [ + "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405161084e38038061084e83398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b600080516020610807833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606101178383604051806060016040528060278152602001610827602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061080783398151915260001b6102cb60201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b610357806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102fb602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b606073ffffffffffffffffffffffffffffffffffffffff84163b610188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516101b0919061028d565b600060405180830381855af49150503d80600081146101eb576040519150601f19603f3d011682016040523d82523d6000602084013e6101f0565b606091505b509150915061020082828661020a565b9695505050505050565b6060831561021957508161004e565b8251156102295782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017f91906102a9565b60005b83811015610278578181015183820152602001610260565b83811115610287576000848401525b50505050565b6000825161029f81846020870161025d565b9190910192915050565b60208152600082518060208401526102c881604085016020870161025d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201e3c9348ed6dd2f363e89451207bd8df182bc878dc80d47166301a510c8801e964736f6c634300080a0033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/sepolia/Loot.json b/deployments/sepolia/Loot.json new file mode 100644 index 0000000..200df2f --- /dev/null +++ b/deployments/sepolia/Loot.json @@ -0,0 +1,1186 @@ +{ + "address": "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "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": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentSnapshotId", + "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": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "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" + } + ], + "transactionHash": "0xb7aa8207c333cc29126aacd92da239361a7dfb99420272f40a55954e476c94be", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + "transactionIndex": 45, + "gasUsed": "2320633", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x30670a9f856f17a25450e2397dd40bbcdf7ab26c2761a23c1be788b4e1477999", + "transactionHash": "0xb7aa8207c333cc29126aacd92da239361a7dfb99420272f40a55954e476c94be", + "logs": [ + { + "transactionIndex": 45, + "blockNumber": 4816763, + "transactionHash": "0xb7aa8207c333cc29126aacd92da239361a7dfb99420272f40a55954e476c94be", + "address": "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 23, + "blockHash": "0x30670a9f856f17a25450e2397dd40bbcdf7ab26c2761a23c1be788b4e1477999" + } + ], + "blockNumber": 4816763, + "cumulativeGasUsed": "8151961", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSnapshotId\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"burn(address,uint256)\":{\"params\":{\"account\":\"Address to lose loot\",\"amount\":\"Amount to burn\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"params\":{\"amount\":\"Amount to mint\",\"recipient\":\"Address to receive loot\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(string,string)\":{\"details\":\"initializer should prevent this from being called again\",\"params\":{\"name_\":\"Name for ERC20 token trackers\",\"symbol_\":\"Symbol for ERC20 token trackers\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(address,uint256)\":{\"notice\":\"Baal-only function to burn loot.\"},\"getCurrentSnapshotId()\":{\"notice\":\"get current SnapshotId\"},\"mint(address,uint256)\":{\"notice\":\"Baal-only function to mint loot.\"},\"pause()\":{\"notice\":\"Baal-only function to pause shares.\"},\"setUp(string,string)\":{\"notice\":\"Configure loot - called by Baal on summon\"},\"snapshot()\":{\"notice\":\"Allows baal to create a snapshot\"},\"unpause()\":{\"notice\":\"Baal-only function to pause shares.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LootERC20.sol\":\"Loot\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0xb1d9e69cf8073efa574b31b1f840e20709139c19bfb27e60b16393d6073f3d42\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private constant _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n /**\\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\\n * However, to ensure consistency with the upgradeable transpiler, we will continue\\n * to reserve a slot.\\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfe1053f3a6ee4527cde96c8152b8b1dbb98774639a64e819087bc80e618d7f7f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./StorageSlotUpgradeable.sol\\\";\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n using StorageSlotUpgradeable for bytes32;\\n\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (unsafeAccess(array, mid).value > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getAddressSlot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getBytes32Slot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getUint256Slot();\\n }\\n}\\n\",\"keccak256\":\"0xc3821e9d41b2b19b612238b308dcc8f4ab46afcd0f6b3bd174e89789bbf59e26\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x798741e231b22b81e2dd2eddaaf8832dee4baf5cd8e2dbaa5c1dd12a1c053c4d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"contracts/LootERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\ncontract Loot is\\n ERC20SnapshotUpgradeable,\\n ERC20PermitUpgradeable,\\n PausableUpgradeable,\\n OwnableUpgradeable,\\n UUPSUpgradeable\\n{\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Configure loot - called by Baal on summon\\n /// @dev initializer should prevent this from being called again\\n /// @param name_ Name for ERC20 token trackers\\n /// @param symbol_ Symbol for ERC20 token trackers\\n function setUp(string memory name_, string memory symbol_)\\n external\\n initializer\\n {\\n require(bytes(name_).length != 0, \\\"loot: name empty\\\");\\n require(bytes(symbol_).length != 0, \\\"loot: symbol empty\\\");\\n\\n __ERC20_init(name_, symbol_);\\n __ERC20Permit_init(name_);\\n __Pausable_init();\\n __ERC20Snapshot_init();\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n }\\n\\n /// @notice Allows baal to create a snapshot\\n function snapshot() external onlyOwner returns(uint256) {\\n return _snapshot();\\n }\\n\\n /// @notice get current SnapshotId\\n function getCurrentSnapshotId() external view returns (uint256) {\\n return _getCurrentSnapshotId();\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n /// @notice Baal-only function to mint loot.\\n /// @param recipient Address to receive loot\\n /// @param amount Amount to mint\\n function mint(address recipient, uint256 amount) external onlyOwner {\\n // can not be more than half the max because of totalsupply of loot and shares\\n require(totalSupply() + amount <= type(uint256).max / 2, \\\"loot: cap exceeded\\\");\\n _mint(recipient, amount);\\n }\\n\\n /// @notice Baal-only function to burn loot.\\n /// @param account Address to lose loot\\n /// @param amount Amount to burn\\n function burn(address account, uint256 amount) external onlyOwner {\\n _burn(account, amount);\\n }\\n\\n /// @notice Internal hook to restrict token transfers unless allowed by baal\\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\\n /// @param from The address of the source account.\\n /// @param to The address of the destination account.\\n /// @param amount The number of `loot` tokens to transfer.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n require(\\n from == address(0) || /*Minting allowed*/\\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\\n !paused(),\\n \\\"loot: !transferable\\\"\\n );\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0xa3b301421fabcf9fc110e5532cc4368c6e25a80348dbfe47f8e8e4dd72ce02cb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b6080523480156200001857600080fd5b506200002362000029565b620000eb565b600054610100900460ff1615620000965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c61288a62000126600039600081816106480152818161069101528181610838015281816108780152610907015261288a6000f3fe6080604052600436106101cd5760003560e01c80635c975abb116100f75780639711715a11610095578063a9059cbb11610064578063a9059cbb146104dc578063d505accf146104fc578063dd62ed3e1461051c578063f2fde38b1461053c57600080fd5b80639711715a14610467578063981b24d01461047c5780639dc29fac1461049c578063a457c2d7146104bc57600080fd5b80637ecebe00116100d15780637ecebe00146103f45780638456cb59146104145780638da5cb5b1461042957806395d89b411461045257600080fd5b80635c975abb1461039157806370a08231146103a9578063715018a6146103df57600080fd5b8063395093511161016f5780634f1ef2861161013e5780634f1ef2861461033457806352d1902d146103475780635439ad861461035c578063562d190d1461037157600080fd5b806339509351146102bf5780633f4ba83a146102df57806340c10f19146102f45780634ee2cd7e1461031457600080fd5b806323b872dd116101ab57806323b872dd1461024c578063313ce5671461026c5780633644e515146102885780633659cfe61461029d57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e761055c565b6040516101f491906125ed565b60405180910390f35b34801561020957600080fd5b5061021d61021836600461251b565b6105ee565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d61026736600461240a565b610608565b34801561027857600080fd5b50604051601281526020016101f4565b34801561029457600080fd5b5061023e61062e565b3480156102a957600080fd5b506102bd6102b83660046123bc565b61063d565b005b3480156102cb57600080fd5b5061021d6102da36600461251b565b610726565b3480156102eb57600080fd5b506102bd610748565b34801561030057600080fd5b506102bd61030f36600461251b565b61075a565b34801561032057600080fd5b5061023e61032f36600461251b565b6107d4565b6102bd6103423660046124b9565b61082d565b34801561035357600080fd5b5061023e6108fa565b34801561036857600080fd5b5061023e6109ad565b34801561037d57600080fd5b506102bd61038c36600461255e565b6109b7565b34801561039d57600080fd5b5060fe5460ff1661021d565b3480156103b557600080fd5b5061023e6103c43660046123bc565b6001600160a01b031660009081526033602052604090205490565b3480156103eb57600080fd5b506102bd610b79565b34801561040057600080fd5b5061023e61040f3660046123bc565b610b8b565b34801561042057600080fd5b506102bd610ba9565b34801561043557600080fd5b50610130546040516001600160a01b0390911681526020016101f4565b34801561045e57600080fd5b506101e7610bb9565b34801561047357600080fd5b5061023e610bc8565b34801561048857600080fd5b5061023e6104973660046125b8565b610bda565b3480156104a857600080fd5b506102bd6104b736600461251b565b610c05565b3480156104c857600080fd5b5061021d6104d736600461251b565b610c17565b3480156104e857600080fd5b5061021d6104f736600461251b565b610c9d565b34801561050857600080fd5b506102bd610517366004612446565b610cab565b34801561052857600080fd5b5061023e6105373660046123d7565b610e0f565b34801561054857600080fd5b506102bd6105573660046123bc565b610e3a565b60606036805461056b90612780565b80601f016020809104026020016040519081016040528092919081815260200182805461059790612780565b80156105e45780601f106105b9576101008083540402835291602001916105e4565b820191906000526020600020905b8154815290600101906020018083116105c757829003601f168201915b5050505050905090565b6000336105fc818585610eb0565b60019150505b92915050565b600033610616858285610fd4565b61062185858561104e565b60019150505b9392505050565b6000610638611204565b905090565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561068f5760405162461bcd60e51b815260040161068690612620565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106d860008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016106869061266c565b6107078161127f565b6040805160008082526020820190925261072391839190611287565b50565b6000336105fc8185856107398383610e0f565b6107439190612703565b610eb0565b610750611401565b61075861145c565b565b610762611401565b61076f600260001961271b565b8161077960355490565b6107839190612703565b11156107c65760405162461bcd60e51b81526020600482015260126024820152711b1bdbdd0e8818d85c08195e18d95959195960721b6044820152606401610686565b6107d082826114ae565b5050565b6001600160a01b0382166000908152606560205260408120819081906107fb90859061157b565b9150915081610822576001600160a01b038516600090815260336020526040902054610824565b805b95945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108765760405162461bcd60e51b815260040161068690612620565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108bf60008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146108e55760405162461bcd60e51b81526004016106869061266c565b6108ee8261127f565b6107d082826001611287565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610686565b5060008051602061280e83398151915290565b6000610638611672565b600054610100900460ff16158080156109d75750600054600160ff909116105b806109f15750303b1580156109f1575060005460ff166001145b610a545760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610686565b6000805460ff191660011790558015610a77576000805461ff0019166101001790555b8251610ab85760405162461bcd60e51b815260206004820152601060248201526f6c6f6f743a206e616d6520656d70747960801b6044820152606401610686565b8151610afb5760405162461bcd60e51b81526020600482015260126024820152716c6f6f743a2073796d626f6c20656d70747960701b6044820152606401610686565b610b05838361167d565b610b0e836116ae565b610b166116f8565b610b1e611727565b610b2661174e565b610b2e611727565b8015610b74576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610b81611401565b610758600061177d565b6001600160a01b038116600090815260cb6020526040812054610602565b610bb1611401565b6107586117d0565b60606037805461056b90612780565b6000610bd2611401565b61063861180d565b6000806000610bea84606661157b565b9150915081610bfb57603554610bfd565b805b949350505050565b610c0d611401565b6107d08282611867565b60003381610c258286610e0f565b905083811015610c855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610686565b610c928286868403610eb0565b506001949350505050565b6000336105fc81858561104e565b83421115610cfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610686565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d2a8c6119a7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d85826119cf565b90506000610d9582878787611a1d565b9050896001600160a01b0316816001600160a01b031614610df85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610686565b610e038a8a8a610eb0565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610e42611401565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610686565b6107238161177d565b6001600160a01b038316610f125760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610686565b6001600160a01b038216610f735760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610686565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fe08484610e0f565b90506000198114611048578181101561103b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610686565b6110488484848403610eb0565b50505050565b6001600160a01b0383166110b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610686565b6001600160a01b0382166111145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610686565b61111f838383611a45565b6001600160a01b038316600090815260336020526040902054818110156111975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610686565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111f79086815260200190565b60405180910390a3611048565b60006106387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61123360975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b610723611401565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156112ba57610b7483611ad3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f357600080fd5b505afa925050508015611323575060408051601f3d908101601f1916820190925261132091810190612545565b60015b6113865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610686565b60008051602061280e83398151915281146113f55760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610686565b50610b74838383611b6f565b610130546001600160a01b031633146107585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610686565b611464611b94565b60fe805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166115045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610686565b61151060008383611a45565b80603560008282546115229190612703565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080600084116115c75760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610686565b6115cf611672565b84111561161e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610686565b600061162a8486611bdd565b845490915081141561164357600080925092505061166b565b600184600101828154811061165a5761165a6127e1565b906000526020600020015492509250505b9250929050565b600061063860685490565b600054610100900460ff166116a45760405162461bcd60e51b8152600401610686906126b8565b6107d08282611c88565b600054610100900460ff166116d55760405162461bcd60e51b8152600401610686906126b8565b61072381604051806040016040528060018152602001603160f81b815250611cd6565b600054610100900460ff1661171f5760405162461bcd60e51b8152600401610686906126b8565b610758611d17565b600054610100900460ff166107585760405162461bcd60e51b8152600401610686906126b8565b600054610100900460ff166117755760405162461bcd60e51b8152600401610686906126b8565b610758611d4a565b61013080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117d8611d7a565b60fe805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114913390565b600061181d606880546001019055565b6000611827611672565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161185a91815260200190565b60405180910390a1919050565b6001600160a01b0382166118c75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610686565b6118d382600083611a45565b6001600160a01b038216600090815260336020526040902054818110156119475760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610686565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b60006106026119dc611204565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611a2e87878787611dc0565b91509150611a3b81611e84565b5095945050505050565b611a50838383611fd2565b6001600160a01b0383161580611a835750610130546001600160a01b031633148015611a8357506001600160a01b038216155b80611a91575060fe5460ff16155b610b745760405162461bcd60e51b81526020600482015260136024820152726c6f6f743a20217472616e7366657261626c6560681b6044820152606401610686565b6001600160a01b0381163b611b405760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610686565b60008051602061280e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611b788361201a565b600082511180611b855750805b15610b7457611048838361205a565b60fe5460ff166107585760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610686565b8154600090611bee57506000610602565b82546000905b80821015611c3b576000611c088383612145565b60008781526020902090915085908201541115611c2757809150611c35565b611c32816001612703565b92505b50611bf4565b600082118015611c67575083611c6486611c5660018661273d565b600091825260209091200190565b54145b15611c8057611c7760018361273d565b92505050610602565b509050610602565b600054610100900460ff16611caf5760405162461bcd60e51b8152600401610686906126b8565b8151611cc2906036906020850190612276565b508051610b74906037906020840190612276565b600054610100900460ff16611cfd5760405162461bcd60e51b8152600401610686906126b8565b815160209283012081519190920120609791909155609855565b600054610100900460ff16611d3e5760405162461bcd60e51b8152600401610686906126b8565b60fe805460ff19169055565b600054610100900460ff16611d715760405162461bcd60e51b8152600401610686906126b8565b6107583361177d565b60fe5460ff16156107585760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610686565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df75750600090506003611e7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e7457600060019250925050611e7b565b9150600090505b94509492505050565b6000816004811115611e9857611e986127cb565b1415611ea15750565b6001816004811115611eb557611eb56127cb565b1415611f035760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610686565b6002816004811115611f1757611f176127cb565b1415611f655760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610686565b6003816004811115611f7957611f796127cb565b14156107235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610686565b6001600160a01b038316611ff157611fe982612160565b610b74612193565b6001600160a01b03821661200857611fe983612160565b61201183612160565b610b7482612160565b61202381611ad3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6120c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610686565b600080846001600160a01b0316846040516120dd91906125d1565b600060405180830381855af49150503d8060008114612118576040519150601f19603f3d011682016040523d82523d6000602084013e61211d565b606091505b5091509150610824828260405180606001604052806027815260200161282e602791396121a1565b6000612154600284841861271b565b61062790848416612703565b6001600160a01b038116600090815260656020908152604080832060339092529091205461072391906121ba565b6121ba565b610758606661218e60355490565b606083156121b0575081610627565b6106278383612204565b60006121c4611672565b9050806121d08461222e565b1015610b74578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8151156122145781518083602001fd5b8060405162461bcd60e51b815260040161068691906125ed565b805460009061223f57506000919050565b8154829061224f9060019061273d565b8154811061225f5761225f6127e1565b90600052602060002001549050919050565b919050565b82805461228290612780565b90600052602060002090601f0160209004810192826122a457600085556122ea565b82601f106122bd57805160ff19168380011785556122ea565b828001600101855582156122ea579182015b828111156122ea5782518255916020019190600101906122cf565b506122f69291506122fa565b5090565b5b808211156122f657600081556001016122fb565b600067ffffffffffffffff8084111561232a5761232a6127f7565b604051601f8501601f19908116603f01168101908282118183101715612352576123526127f7565b8160405280935085815286868601111561236b57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461227157600080fd5b600082601f8301126123ad57600080fd5b6106278383356020850161230f565b6000602082840312156123ce57600080fd5b61062782612385565b600080604083850312156123ea57600080fd5b6123f383612385565b915061240160208401612385565b90509250929050565b60008060006060848603121561241f57600080fd5b61242884612385565b925061243660208501612385565b9150604084013590509250925092565b600080600080600080600060e0888a03121561246157600080fd5b61246a88612385565b965061247860208901612385565b95506040880135945060608801359350608088013560ff8116811461249c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156124cc57600080fd5b6124d583612385565b9150602083013567ffffffffffffffff8111156124f157600080fd5b8301601f8101851361250257600080fd5b6125118582356020840161230f565b9150509250929050565b6000806040838503121561252e57600080fd5b61253783612385565b946020939093013593505050565b60006020828403121561255757600080fd5b5051919050565b6000806040838503121561257157600080fd5b823567ffffffffffffffff8082111561258957600080fd5b6125958683870161239c565b935060208501359150808211156125ab57600080fd5b506125118582860161239c565b6000602082840312156125ca57600080fd5b5035919050565b600082516125e3818460208701612754565b9190910192915050565b602081526000825180602084015261260c816040850160208701612754565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115612716576127166127b5565b500190565b60008261273857634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561274f5761274f6127b5565b500390565b60005b8381101561276f578181015183820152602001612757565b838111156110485750506000910152565b600181811c9082168061279457607f821691505b602082108114156119c957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204196986f131ab75e482c8e8e87b668e2e5b20fa8d630b5bb7623e2871e6c4b6f64736f6c63430008070033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80635c975abb116100f75780639711715a11610095578063a9059cbb11610064578063a9059cbb146104dc578063d505accf146104fc578063dd62ed3e1461051c578063f2fde38b1461053c57600080fd5b80639711715a14610467578063981b24d01461047c5780639dc29fac1461049c578063a457c2d7146104bc57600080fd5b80637ecebe00116100d15780637ecebe00146103f45780638456cb59146104145780638da5cb5b1461042957806395d89b411461045257600080fd5b80635c975abb1461039157806370a08231146103a9578063715018a6146103df57600080fd5b8063395093511161016f5780634f1ef2861161013e5780634f1ef2861461033457806352d1902d146103475780635439ad861461035c578063562d190d1461037157600080fd5b806339509351146102bf5780633f4ba83a146102df57806340c10f19146102f45780634ee2cd7e1461031457600080fd5b806323b872dd116101ab57806323b872dd1461024c578063313ce5671461026c5780633644e515146102885780633659cfe61461029d57600080fd5b806306fdde03146101d2578063095ea7b3146101fd57806318160ddd1461022d575b600080fd5b3480156101de57600080fd5b506101e761055c565b6040516101f491906125ed565b60405180910390f35b34801561020957600080fd5b5061021d61021836600461251b565b6105ee565b60405190151581526020016101f4565b34801561023957600080fd5b506035545b6040519081526020016101f4565b34801561025857600080fd5b5061021d61026736600461240a565b610608565b34801561027857600080fd5b50604051601281526020016101f4565b34801561029457600080fd5b5061023e61062e565b3480156102a957600080fd5b506102bd6102b83660046123bc565b61063d565b005b3480156102cb57600080fd5b5061021d6102da36600461251b565b610726565b3480156102eb57600080fd5b506102bd610748565b34801561030057600080fd5b506102bd61030f36600461251b565b61075a565b34801561032057600080fd5b5061023e61032f36600461251b565b6107d4565b6102bd6103423660046124b9565b61082d565b34801561035357600080fd5b5061023e6108fa565b34801561036857600080fd5b5061023e6109ad565b34801561037d57600080fd5b506102bd61038c36600461255e565b6109b7565b34801561039d57600080fd5b5060fe5460ff1661021d565b3480156103b557600080fd5b5061023e6103c43660046123bc565b6001600160a01b031660009081526033602052604090205490565b3480156103eb57600080fd5b506102bd610b79565b34801561040057600080fd5b5061023e61040f3660046123bc565b610b8b565b34801561042057600080fd5b506102bd610ba9565b34801561043557600080fd5b50610130546040516001600160a01b0390911681526020016101f4565b34801561045e57600080fd5b506101e7610bb9565b34801561047357600080fd5b5061023e610bc8565b34801561048857600080fd5b5061023e6104973660046125b8565b610bda565b3480156104a857600080fd5b506102bd6104b736600461251b565b610c05565b3480156104c857600080fd5b5061021d6104d736600461251b565b610c17565b3480156104e857600080fd5b5061021d6104f736600461251b565b610c9d565b34801561050857600080fd5b506102bd610517366004612446565b610cab565b34801561052857600080fd5b5061023e6105373660046123d7565b610e0f565b34801561054857600080fd5b506102bd6105573660046123bc565b610e3a565b60606036805461056b90612780565b80601f016020809104026020016040519081016040528092919081815260200182805461059790612780565b80156105e45780601f106105b9576101008083540402835291602001916105e4565b820191906000526020600020905b8154815290600101906020018083116105c757829003601f168201915b5050505050905090565b6000336105fc818585610eb0565b60019150505b92915050565b600033610616858285610fd4565b61062185858561104e565b60019150505b9392505050565b6000610638611204565b905090565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561068f5760405162461bcd60e51b815260040161068690612620565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106d860008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146106fe5760405162461bcd60e51b81526004016106869061266c565b6107078161127f565b6040805160008082526020820190925261072391839190611287565b50565b6000336105fc8185856107398383610e0f565b6107439190612703565b610eb0565b610750611401565b61075861145c565b565b610762611401565b61076f600260001961271b565b8161077960355490565b6107839190612703565b11156107c65760405162461bcd60e51b81526020600482015260126024820152711b1bdbdd0e8818d85c08195e18d95959195960721b6044820152606401610686565b6107d082826114ae565b5050565b6001600160a01b0382166000908152606560205260408120819081906107fb90859061157b565b9150915081610822576001600160a01b038516600090815260336020526040902054610824565b805b95945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108765760405162461bcd60e51b815260040161068690612620565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108bf60008051602061280e833981519152546001600160a01b031690565b6001600160a01b0316146108e55760405162461bcd60e51b81526004016106869061266c565b6108ee8261127f565b6107d082826001611287565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610686565b5060008051602061280e83398151915290565b6000610638611672565b600054610100900460ff16158080156109d75750600054600160ff909116105b806109f15750303b1580156109f1575060005460ff166001145b610a545760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610686565b6000805460ff191660011790558015610a77576000805461ff0019166101001790555b8251610ab85760405162461bcd60e51b815260206004820152601060248201526f6c6f6f743a206e616d6520656d70747960801b6044820152606401610686565b8151610afb5760405162461bcd60e51b81526020600482015260126024820152716c6f6f743a2073796d626f6c20656d70747960701b6044820152606401610686565b610b05838361167d565b610b0e836116ae565b610b166116f8565b610b1e611727565b610b2661174e565b610b2e611727565b8015610b74576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610b81611401565b610758600061177d565b6001600160a01b038116600090815260cb6020526040812054610602565b610bb1611401565b6107586117d0565b60606037805461056b90612780565b6000610bd2611401565b61063861180d565b6000806000610bea84606661157b565b9150915081610bfb57603554610bfd565b805b949350505050565b610c0d611401565b6107d08282611867565b60003381610c258286610e0f565b905083811015610c855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610686565b610c928286868403610eb0565b506001949350505050565b6000336105fc81858561104e565b83421115610cfb5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610686565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d2a8c6119a7565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d85826119cf565b90506000610d9582878787611a1d565b9050896001600160a01b0316816001600160a01b031614610df85760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610686565b610e038a8a8a610eb0565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610e42611401565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610686565b6107238161177d565b6001600160a01b038316610f125760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610686565b6001600160a01b038216610f735760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610686565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610fe08484610e0f565b90506000198114611048578181101561103b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610686565b6110488484848403610eb0565b50505050565b6001600160a01b0383166110b25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610686565b6001600160a01b0382166111145760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610686565b61111f838383611a45565b6001600160a01b038316600090815260336020526040902054818110156111975760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610686565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906111f79086815260200190565b60405180910390a3611048565b60006106387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61123360975490565b6098546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b610723611401565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156112ba57610b7483611ad3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f357600080fd5b505afa925050508015611323575060408051601f3d908101601f1916820190925261132091810190612545565b60015b6113865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610686565b60008051602061280e83398151915281146113f55760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610686565b50610b74838383611b6f565b610130546001600160a01b031633146107585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610686565b611464611b94565b60fe805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166115045760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610686565b61151060008383611a45565b80603560008282546115229190612703565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080600084116115c75760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b6044820152606401610686565b6115cf611672565b84111561161e5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610686565b600061162a8486611bdd565b845490915081141561164357600080925092505061166b565b600184600101828154811061165a5761165a6127e1565b906000526020600020015492509250505b9250929050565b600061063860685490565b600054610100900460ff166116a45760405162461bcd60e51b8152600401610686906126b8565b6107d08282611c88565b600054610100900460ff166116d55760405162461bcd60e51b8152600401610686906126b8565b61072381604051806040016040528060018152602001603160f81b815250611cd6565b600054610100900460ff1661171f5760405162461bcd60e51b8152600401610686906126b8565b610758611d17565b600054610100900460ff166107585760405162461bcd60e51b8152600401610686906126b8565b600054610100900460ff166117755760405162461bcd60e51b8152600401610686906126b8565b610758611d4a565b61013080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117d8611d7a565b60fe805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114913390565b600061181d606880546001019055565b6000611827611672565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb678160405161185a91815260200190565b60405180910390a1919050565b6001600160a01b0382166118c75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610686565b6118d382600083611a45565b6001600160a01b038216600090815260336020526040902054818110156119475760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610686565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b038116600090815260cb602052604090208054600181018255905b50919050565b60006106026119dc611204565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611a2e87878787611dc0565b91509150611a3b81611e84565b5095945050505050565b611a50838383611fd2565b6001600160a01b0383161580611a835750610130546001600160a01b031633148015611a8357506001600160a01b038216155b80611a91575060fe5460ff16155b610b745760405162461bcd60e51b81526020600482015260136024820152726c6f6f743a20217472616e7366657261626c6560681b6044820152606401610686565b6001600160a01b0381163b611b405760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610686565b60008051602061280e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611b788361201a565b600082511180611b855750805b15610b7457611048838361205a565b60fe5460ff166107585760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610686565b8154600090611bee57506000610602565b82546000905b80821015611c3b576000611c088383612145565b60008781526020902090915085908201541115611c2757809150611c35565b611c32816001612703565b92505b50611bf4565b600082118015611c67575083611c6486611c5660018661273d565b600091825260209091200190565b54145b15611c8057611c7760018361273d565b92505050610602565b509050610602565b600054610100900460ff16611caf5760405162461bcd60e51b8152600401610686906126b8565b8151611cc2906036906020850190612276565b508051610b74906037906020840190612276565b600054610100900460ff16611cfd5760405162461bcd60e51b8152600401610686906126b8565b815160209283012081519190920120609791909155609855565b600054610100900460ff16611d3e5760405162461bcd60e51b8152600401610686906126b8565b60fe805460ff19169055565b600054610100900460ff16611d715760405162461bcd60e51b8152600401610686906126b8565b6107583361177d565b60fe5460ff16156107585760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610686565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df75750600090506003611e7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e7457600060019250925050611e7b565b9150600090505b94509492505050565b6000816004811115611e9857611e986127cb565b1415611ea15750565b6001816004811115611eb557611eb56127cb565b1415611f035760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610686565b6002816004811115611f1757611f176127cb565b1415611f655760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610686565b6003816004811115611f7957611f796127cb565b14156107235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610686565b6001600160a01b038316611ff157611fe982612160565b610b74612193565b6001600160a01b03821661200857611fe983612160565b61201183612160565b610b7482612160565b61202381611ad3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6120c25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610686565b600080846001600160a01b0316846040516120dd91906125d1565b600060405180830381855af49150503d8060008114612118576040519150601f19603f3d011682016040523d82523d6000602084013e61211d565b606091505b5091509150610824828260405180606001604052806027815260200161282e602791396121a1565b6000612154600284841861271b565b61062790848416612703565b6001600160a01b038116600090815260656020908152604080832060339092529091205461072391906121ba565b6121ba565b610758606661218e60355490565b606083156121b0575081610627565b6106278383612204565b60006121c4611672565b9050806121d08461222e565b1015610b74578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b8151156122145781518083602001fd5b8060405162461bcd60e51b815260040161068691906125ed565b805460009061223f57506000919050565b8154829061224f9060019061273d565b8154811061225f5761225f6127e1565b90600052602060002001549050919050565b919050565b82805461228290612780565b90600052602060002090601f0160209004810192826122a457600085556122ea565b82601f106122bd57805160ff19168380011785556122ea565b828001600101855582156122ea579182015b828111156122ea5782518255916020019190600101906122cf565b506122f69291506122fa565b5090565b5b808211156122f657600081556001016122fb565b600067ffffffffffffffff8084111561232a5761232a6127f7565b604051601f8501601f19908116603f01168101908282118183101715612352576123526127f7565b8160405280935085815286868601111561236b57600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b038116811461227157600080fd5b600082601f8301126123ad57600080fd5b6106278383356020850161230f565b6000602082840312156123ce57600080fd5b61062782612385565b600080604083850312156123ea57600080fd5b6123f383612385565b915061240160208401612385565b90509250929050565b60008060006060848603121561241f57600080fd5b61242884612385565b925061243660208501612385565b9150604084013590509250925092565b600080600080600080600060e0888a03121561246157600080fd5b61246a88612385565b965061247860208901612385565b95506040880135945060608801359350608088013560ff8116811461249c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156124cc57600080fd5b6124d583612385565b9150602083013567ffffffffffffffff8111156124f157600080fd5b8301601f8101851361250257600080fd5b6125118582356020840161230f565b9150509250929050565b6000806040838503121561252e57600080fd5b61253783612385565b946020939093013593505050565b60006020828403121561255757600080fd5b5051919050565b6000806040838503121561257157600080fd5b823567ffffffffffffffff8082111561258957600080fd5b6125958683870161239c565b935060208501359150808211156125ab57600080fd5b506125118582860161239c565b6000602082840312156125ca57600080fd5b5035919050565b600082516125e3818460208701612754565b9190910192915050565b602081526000825180602084015261260c816040850160208701612754565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115612716576127166127b5565b500190565b60008261273857634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561274f5761274f6127b5565b500390565b60005b8381101561276f578181015183820152602001612757565b838111156110485750506000910152565b600181811c9082168061279457607f821691505b602082108114156119c957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204196986f131ab75e482c8e8e87b668e2e5b20fa8d630b5bb7623e2871e6c4b6f64736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "balanceOfAt(address,uint256)": { + "details": "Retrieves the balance of `account` at the time `snapshotId` was created." + }, + "burn(address,uint256)": { + "params": { + "account": "Address to lose loot", + "amount": "Amount to burn" + } + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "params": { + "amount": "Amount to mint", + "recipient": "Address to receive loot" + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(string,string)": { + "details": "initializer should prevent this from being called again", + "params": { + "name_": "Name for ERC20 token trackers", + "symbol_": "Symbol for ERC20 token trackers" + } + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "totalSupplyAt(uint256)": { + "details": "Retrieves the total supply at the time `snapshotId` was created." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burn(address,uint256)": { + "notice": "Baal-only function to burn loot." + }, + "getCurrentSnapshotId()": { + "notice": "get current SnapshotId" + }, + "mint(address,uint256)": { + "notice": "Baal-only function to mint loot." + }, + "pause()": { + "notice": "Baal-only function to pause shares." + }, + "setUp(string,string)": { + "notice": "Configure loot - called by Baal on summon" + }, + "snapshot()": { + "notice": "Allows baal to create a snapshot" + }, + "unpause()": { + "notice": "Baal-only function to pause shares." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4971, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 4977, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 4979, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 4981, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 4983, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 5563, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 5685, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_address,t_struct(Snapshots)5680_storage)" + }, + { + "astId": 5688, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "102", + "type": "t_struct(Snapshots)5680_storage" + }, + { + "astId": 5691, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_currentSnapshotId", + "offset": 0, + "slot": "104", + "type": "t_struct(Counter)6730_storage" + }, + { + "astId": 5989, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "105", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 7403, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6041, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)6730_storage)" + }, + { + "astId": 6049, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32" + }, + { + "astId": 6205, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4773, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_paused", + "offset": 0, + "slot": "254", + "type": "t_bool" + }, + { + "astId": 4878, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3937, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_owner", + "offset": 0, + "slot": "304", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/LootERC20.sol:Loot", + "label": "__gap", + "offset": 0, + "slot": "404", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)6730_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)6730_storage" + }, + "t_mapping(t_address,t_struct(Snapshots)5680_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20SnapshotUpgradeable.Snapshots)", + "numberOfBytes": "32", + "value": "t_struct(Snapshots)5680_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)6730_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 6729, + "contract": "contracts/LootERC20.sol:Loot", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Snapshots)5680_storage": { + "encoding": "inplace", + "label": "struct ERC20SnapshotUpgradeable.Snapshots", + "members": [ + { + "astId": 5676, + "contract": "contracts/LootERC20.sol:Loot", + "label": "ids", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 5679, + "contract": "contracts/LootERC20.sol:Loot", + "label": "values", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/Shares.json b/deployments/sepolia/Shares.json new file mode 100644 index 0000000..846fce7 --- /dev/null +++ b/deployments/sepolia/Shares.json @@ -0,0 +1,1624 @@ +{ + "address": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "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": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromTimePoint", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "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": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegationNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nCheckpoints", + "type": "uint256" + } + ], + "name": "getCheckpoint", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromTimePoint", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "internalType": "struct BaalVotes.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timePoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "votes", + "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": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "now", + "outputs": [ + { + "internalType": "uint256", + "name": "timePoint", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "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" + } + ], + "transactionHash": "0x66d7df5aa43ee5e818b14fb7eecd4791b2ff7603a63014507092a6f064c54aa0", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "transactionIndex": 0, + "gasUsed": "2950689", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb807aa1ea1d9d402fbbe2c8b7f15eb5e5cb0feaddccb8ce28dd18c4483ee3e92", + "transactionHash": "0x66d7df5aa43ee5e818b14fb7eecd4791b2ff7603a63014507092a6f064c54aa0", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 4816764, + "transactionHash": "0x66d7df5aa43ee5e818b14fb7eecd4791b2ff7603a63014507092a6f064c54aa0", + "address": "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 0, + "blockHash": "0xb807aa1ea1d9d402fbbe2c8b7f15eb5e5cb0feaddccb8ce28dd18c4483ee3e92" + } + ], + "blockNumber": 4816764, + "cumulativeGasUsed": "2950689", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"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\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromTimePoint\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"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\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegationNonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nCheckpoints\",\"type\":\"uint256\"}],\"name\":\"getCheckpoint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fromTimePoint\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"internalType\":\"struct BaalVotes.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSnapshotId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timePoint\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"votes\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"now\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timePoint\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"name\":\"setUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"burn(address,uint256)\":{\"params\":{\"account\":\"Address to lose shares\",\"amount\":\"Amount to burn\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to.\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate 'votes' to.\",\"expiry\":\"The time at which to expire the signature.\",\"nonce\":\"The contract state required to match the signature.\",\"r\":\"The r signature\",\"s\":\"The s signature\",\"v\":\"The v signature\"}},\"getPastVotes(address,uint256)\":{\"params\":{\"account\":\"The user to check `votes` for.\",\"timePoint\":\"The unix time to check `votes` for.\"},\"returns\":{\"votes\":\"Past `votes` delegated to `account`.\"}},\"getVotes(address)\":{\"params\":{\"account\":\"The user to check delegated `votes` for.\"},\"returns\":{\"votes\":\"Current `votes` delegated to `account`.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"mint(address,uint256)\":{\"params\":{\"amount\":\"Amount to mint\",\"recipient\":\"Address to receive shares\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"now()\":{\"returns\":{\"timePoint\":\"returns unix epoch timestamp\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setUp(string,string)\":{\"details\":\"initializer should prevent this from being called again\",\"params\":{\"name_\":\"Name for ERC20 token trackers\",\"symbol_\":\"Symbol for ERC20 token trackers\"}},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"title\":\"Shares\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(address,uint256)\":{\"notice\":\"Baal-only function to burn shares.\"},\"delegate(address)\":{\"notice\":\"Delegate votes from user to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from `signer` to `delegatee` with EIP-712 signature.\"},\"getCurrentSnapshotId()\":{\"notice\":\"get current SnapshotId\"},\"getPastVotes(address,uint256)\":{\"notice\":\"Returns the prior number of `votes` for `account` as of `timePoint`.\"},\"getVotes(address)\":{\"notice\":\"Returns the current delegated `vote` balance for `account`.\"},\"mint(address,uint256)\":{\"notice\":\"Baal-only function to mint shares.\"},\"now()\":{\"notice\":\"Returns the current timepoint.\"},\"pause()\":{\"notice\":\"Baal-only function to pause shares.\"},\"setUp(string,string)\":{\"notice\":\"Configure shares - called by Baal on summon\"},\"snapshot()\":{\"notice\":\"Allows baal to create a snapshot\"},\"unpause()\":{\"notice\":\"Baal-only function to unpause shares.\"}},\"notice\":\"Accounting for Baal non voting shares\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/SharesERC20.sol\":\"Shares\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822ProxiableUpgradeable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeaconUpgradeable {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeTo(address newImplementation) external virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x7967d130887c4b40666cd88f8744691d4527039a1b2a38aa0de41481ef646778\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0xb1d9e69cf8073efa574b31b1f840e20709139c19bfb27e60b16393d6073f3d42\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/ArraysUpgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\\n * total supply at the time are recorded for later access.\\n *\\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\\n * In naive implementations it's possible to perform a \\\"double spend\\\" attack by reusing the same balance from different\\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\\n * used to create an efficient ERC20 forking mechanism.\\n *\\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\\n * and the account address.\\n *\\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\\n *\\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\\n * alternative consider {ERC20Votes}.\\n *\\n * ==== Gas Costs\\n *\\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\\n *\\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\\n * transfers will have normal cost until the next snapshot, and so on.\\n */\\n\\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\\n function __ERC20Snapshot_init() internal onlyInitializing {\\n }\\n\\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\\n }\\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\\n\\n using ArraysUpgradeable for uint256[];\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\\n // Snapshot struct, but that would impede usage of functions that work on an array.\\n struct Snapshots {\\n uint256[] ids;\\n uint256[] values;\\n }\\n\\n mapping(address => Snapshots) private _accountBalanceSnapshots;\\n Snapshots private _totalSupplySnapshots;\\n\\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\\n CountersUpgradeable.Counter private _currentSnapshotId;\\n\\n /**\\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\\n */\\n event Snapshot(uint256 id);\\n\\n /**\\n * @dev Creates a new snapshot and returns its snapshot id.\\n *\\n * Emits a {Snapshot} event that contains the same id.\\n *\\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\\n *\\n * [WARNING]\\n * ====\\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\\n * you must consider that it can potentially be used by attackers in two ways.\\n *\\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\\n * section above.\\n *\\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\\n * ====\\n */\\n function _snapshot() internal virtual returns (uint256) {\\n _currentSnapshotId.increment();\\n\\n uint256 currentId = _getCurrentSnapshotId();\\n emit Snapshot(currentId);\\n return currentId;\\n }\\n\\n /**\\n * @dev Get the current snapshotId\\n */\\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\\n return _currentSnapshotId.current();\\n }\\n\\n /**\\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\\n */\\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\\n\\n return snapshotted ? value : balanceOf(account);\\n }\\n\\n /**\\n * @dev Retrieves the total supply at the time `snapshotId` was created.\\n */\\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\\n\\n return snapshotted ? value : totalSupply();\\n }\\n\\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n if (from == address(0)) {\\n // mint\\n _updateAccountSnapshot(to);\\n _updateTotalSupplySnapshot();\\n } else if (to == address(0)) {\\n // burn\\n _updateAccountSnapshot(from);\\n _updateTotalSupplySnapshot();\\n } else {\\n // transfer\\n _updateAccountSnapshot(from);\\n _updateAccountSnapshot(to);\\n }\\n }\\n\\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\\n require(snapshotId > 0, \\\"ERC20Snapshot: id is 0\\\");\\n require(snapshotId <= _getCurrentSnapshotId(), \\\"ERC20Snapshot: nonexistent id\\\");\\n\\n // When a valid snapshot is queried, there are three possibilities:\\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\\n // to this id is the current one.\\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\\n // requested id, and its value is the one to return.\\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\\n // larger than the requested one.\\n //\\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\\n // exactly this.\\n\\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\\n\\n if (index == snapshots.ids.length) {\\n return (false, 0);\\n } else {\\n return (true, snapshots.values[index]);\\n }\\n }\\n\\n function _updateAccountSnapshot(address account) private {\\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\\n }\\n\\n function _updateTotalSupplySnapshot() private {\\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\\n }\\n\\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\\n uint256 currentId = _getCurrentSnapshotId();\\n if (_lastSnapshotId(snapshots.ids) < currentId) {\\n snapshots.ids.push(currentId);\\n snapshots.values.push(currentValue);\\n }\\n }\\n\\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\\n if (ids.length == 0) {\\n return 0;\\n } else {\\n return ids[ids.length - 1];\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0x42da8099f59958af496f6c8f0d9c1ce0a929151e02f877e4be23aca4cc440cbe\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./draft-IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../ERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"../../../utils/cryptography/EIP712Upgradeable.sol\\\";\\nimport \\\"../../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 51\\n */\\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private constant _PERMIT_TYPEHASH =\\n keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n /**\\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\\n * However, to ensure consistency with the upgradeable transpiler, we will continue\\n * to reserve a slot.\\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\\n __EIP712_init_unchained(name, \\\"1\\\");\\n }\\n\\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfe1053f3a6ee4527cde96c8152b8b1dbb98774639a64e819087bc80e618d7f7f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xcc70d8e2281fb3ff69e8ab242500f10142cd0a7fa8dd9e45882be270d4d09024\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./StorageSlotUpgradeable.sol\\\";\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev Collection of functions related to array types.\\n */\\nlibrary ArraysUpgradeable {\\n using StorageSlotUpgradeable for bytes32;\\n\\n /**\\n * @dev Searches a sorted `array` and returns the first index that contains\\n * a value greater or equal to `element`. If no such index exists (i.e. all\\n * values in the array are strictly less than `element`), the array length is\\n * returned. Time complexity O(log n).\\n *\\n * `array` is expected to be sorted in ascending order, and to contain no\\n * repeated elements.\\n */\\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\\n if (array.length == 0) {\\n return 0;\\n }\\n\\n uint256 low = 0;\\n uint256 high = array.length;\\n\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n\\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\\n // because Math.average rounds down (it does integer division with truncation).\\n if (unsafeAccess(array, mid).value > element) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n\\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\\n return low - 1;\\n } else {\\n return low;\\n }\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getAddressSlot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getBytes32Slot();\\n }\\n\\n /**\\n * @dev Access an array in an \\\"unsafe\\\" way. Skips solidity \\\"index-out-of-range\\\" check.\\n *\\n * WARNING: Only use if you are certain `pos` is lower than the array length.\\n */\\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\\n bytes32 slot;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0, arr.slot)\\n slot := add(keccak256(0, 0x20), pos)\\n }\\n return slot.getUint256Slot();\\n }\\n}\\n\",\"keccak256\":\"0xc3821e9d41b2b19b612238b308dcc8f4ab46afcd0f6b3bd174e89789bbf59e26\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x798741e231b22b81e2dd2eddaaf8832dee4baf5cd8e2dbaa5c1dd12a1c053c4d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlotUpgradeable {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/SharesERC20.sol\":{\"content\":\"pragma solidity 0.8.7;\\n//SPDX-License-Identifier: MIT\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\\\";\\n\\nimport \\\"./utils/BaalVotes.sol\\\";\\nimport \\\"./interfaces/IBaal.sol\\\";\\n\\n// import \\\"hardhat/console.sol\\\";\\n\\n/// @title Shares\\n/// @notice Accounting for Baal non voting shares\\ncontract Shares is BaalVotes, ERC20SnapshotUpgradeable, OwnableUpgradeable, PausableUpgradeable, UUPSUpgradeable {\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Configure shares - called by Baal on summon\\n /// @dev initializer should prevent this from being called again\\n /// @param name_ Name for ERC20 token trackers\\n /// @param symbol_ Symbol for ERC20 token trackers\\n function setUp(string memory name_, string memory symbol_)\\n external\\n initializer\\n {\\n require(bytes(name_).length != 0, \\\"shares: name empty\\\");\\n require(bytes(symbol_).length != 0, \\\"shares: symbol empty\\\");\\n\\n __ERC20_init(name_, symbol_);\\n __ERC20Permit_init(name_);\\n __Pausable_init();\\n __ERC20Snapshot_init();\\n __Ownable_init();\\n __UUPSUpgradeable_init();\\n __EIP712_init_delegation(\\\"delegation\\\", \\\"4\\\");\\n\\n\\n }\\n\\n /// @notice Baal-only function to pause shares.\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n /// @notice Baal-only function to unpause shares.\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n /// @notice Allows baal to create a snapshot\\n function snapshot() external onlyOwner returns(uint256) {\\n return _snapshot();\\n }\\n\\n /// @notice get current SnapshotId\\n function getCurrentSnapshotId() external view returns (uint256) {\\n return _getCurrentSnapshotId();\\n }\\n\\n /// @notice Baal-only function to mint shares.\\n /// @param recipient Address to receive shares\\n /// @param amount Amount to mint\\n function mint(address recipient, uint256 amount) external onlyOwner {\\n // can not be more than half the max because of totalsupply of loot and shares\\n require(totalSupply() + amount <= type(uint256).max / 2, \\\"shares: cap exceeded\\\");\\n _mint(recipient, amount);\\n }\\n\\n /// @notice Baal-only function to burn shares.\\n /// @param account Address to lose shares\\n /// @param amount Amount to burn\\n function burn(address account, uint256 amount) external onlyOwner {\\n _burn(account, amount);\\n }\\n\\n /// @notice Internal hook to restrict token transfers unless allowed by baal\\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\\n /// @param from The address of the source account.\\n /// @param to The address of the destination account.\\n /// @param amount The number of `shares` tokens to transfer.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override(BaalVotes, ERC20SnapshotUpgradeable) {\\n super._beforeTokenTransfer(from, to, amount);\\n require(\\n from == address(0) || /*Minting allowed*/\\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\\n !paused(),\\n \\\"shares: !transferable\\\"\\n );\\n }\\n\\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\\n}\\n\",\"keccak256\":\"0x01a30f13f538ee4d7e448aa984e10f24a18d7a35e9e45ab3b501364516f0725d\",\"license\":\"MIT\"},\"contracts/interfaces/IBaal.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaal {\\n function lootToken() external view returns (address);\\n function sharesToken() external view returns (address);\\n function votingPeriod() external view returns (uint32);\\n function gracePeriod() external view returns (uint32);\\n function proposalCount() external view returns (uint32);\\n function proposalOffering() external view returns (uint256);\\n function quorumPercent() external view returns (uint256);\\n function sponsorThreshold() external view returns (uint256);\\n function minRetentionPercent() external view returns (uint256);\\n function latestSponsoredProposalId() external view returns (uint32);\\n\\n function setUp(bytes memory initializationParams) external;\\n function multisendLibrary() external view returns (address);\\n // Module\\n function avatar() external view returns (address);\\n function target() external view returns (address);\\n function setAvatar(address avatar) external;\\n function setTarget(address avatar) external;\\n // BaseRelayRecipient\\n function trustedForwarder() external view returns (address);\\n function setTrustedForwarder(address trustedForwarderAddress) external;\\n\\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\\n function totalLoot() external view returns (uint256);\\n function totalShares() external view returns (uint256);\\n function totalSupply() external view returns (uint256);\\n function lootPaused() external view returns (bool);\\n function sharesPaused() external view returns (bool);\\n \\n function shamans(address shaman) external view returns (uint256);\\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\\n function isAdmin(address shaman) external view returns (bool);\\n function isManager(address shaman) external view returns (bool);\\n function isGovernor(address shaman) external view returns (bool);\\n function lockAdmin() external;\\n function lockManager() external;\\n function lockGovernor() external;\\n function adminLock() external view returns (bool);\\n function managerLock() external view returns (bool);\\n function governorLock() external view returns (bool);\\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\\n function setGovernanceConfig(bytes memory governanceConfig) external;\\n\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable returns (uint256);\\n function sponsorProposal(uint32 id) external;\\n function processProposal(uint32 id, bytes calldata proposalData) external;\\n function cancelProposal(uint32 id) external;\\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\\n function submitVote(uint32 id, bool approved) external;\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\\n\\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xa8e49237a041f30caf45f9999fe28fdaac6a847530f411761a9b493022622948\",\"license\":\"MIT\"},\"contracts/utils/BaalVotes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\\\";\\nimport \\\"./DelegationEIP712Upgradeable.sol\\\";\\n\\n/**\\n * @dev similar to Openzeplin ERC20Votes\\n *\\n * uses timestamp instead of block.number and auto self delegates.\\n *\\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\\n * power can be queried through the public accessors {getPriorVotes}.\\n *\\n */\\nabstract contract BaalVotes is ERC20PermitUpgradeable, DelegationEIP712Upgradeable {\\n using ECDSAUpgradeable for bytes32;\\n\\n struct Checkpoint {\\n /*Baal checkpoint for marking number of delegated votes*/\\n uint32 fromTimePoint; /*unix time for referencing voting balance*/\\n uint256 votes; /*votes at given unix time*/\\n }\\n\\n // DELEGATE TRACKING\\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints; /*maps record of vote `checkpoints` for each account by index*/\\n mapping(address => uint256) public numCheckpoints; /*maps number of `checkpoints` for each account*/\\n mapping(address => address) public delegates; /*maps record of each account's `shares` delegate*/\\n mapping(address => uint256) public delegationNonces; /*nonces for delegating by signature*/\\n\\n // SIGNATURE HELPERS\\n bytes32 constant DELEGATION_TYPEHASH = keccak256(\\\"Delegation(string name,address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n event DelegateChanged(\\n address indexed delegator,\\n address indexed fromDelegate,\\n address indexed toDelegate\\n ); /*emits when an account changes its voting delegate*/\\n event DelegateVotesChanged(\\n address indexed delegate,\\n uint256 previousBalance,\\n uint256 newBalance\\n ); /*emits when a delegate account's voting balance changes*/\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n /*If recipient is receiving their first shares, auto-self delegate*/\\n if (balanceOf(to) == 0 && numCheckpoints[to] == 0 && amount > 0) {\\n delegates[to] = to;\\n }\\n\\n _moveDelegates(delegates[from], delegates[to], amount);\\n }\\n\\n /// @notice Delegate votes from user to `delegatee`.\\n /// @param delegatee The address to delegate votes to.\\n function delegate(address delegatee) external virtual {\\n _delegate(msg.sender, delegatee);\\n }\\n\\n /// @notice Delegates votes from `signer` to `delegatee` with EIP-712 signature.\\n /// @param delegatee The address to delegate 'votes' to.\\n /// @param nonce The contract state required to match the signature.\\n /// @param expiry The time at which to expire the signature.\\n /// @param v The v signature\\n /// @param r The r signature\\n /// @param s The s signature\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public {\\n require(now() <= expiry, \\\"ERC20Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4Delegation(\\n keccak256(\\n abi.encode(\\n DELEGATION_TYPEHASH,\\n keccak256(abi.encodePacked(name())),\\n delegatee,\\n nonce,\\n expiry\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n require(signer != address(0), \\\"ERC20Votes: invalid signer (0x0)\\\");\\n require(nonce == delegationNonces[signer], \\\"ERC20Votes: invalid nonce\\\");\\n\\n delegationNonces[signer]++;\\n _delegate(signer, delegatee);\\n }\\n\\n /// @notice Delegates Baal voting weight.\\n /// @param delegator The address to delegate 'votes' from.\\n /// @param delegatee The address to delegate 'votes' to.\\n function _delegate(address delegator, address delegatee) internal virtual {\\n require(balanceOf(delegator) > 0, \\\"!shares\\\");\\n address currentDelegate = delegates[delegator];\\n delegates[delegator] = delegatee;\\n\\n _moveDelegates(\\n currentDelegate,\\n delegatee,\\n uint256(balanceOf(delegator))\\n );\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n }\\n\\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\\n /// @param srcRep The address to delegate 'votes' from.\\n /// @param dstRep The address to delegate 'votes' to.\\n /// @param amount The amount of votes to delegate\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint256 amount\\n ) private {\\n unchecked {\\n if (srcRep != dstRep && amount != 0) {\\n if (srcRep != address(0)) {\\n uint256 srcRepNum = numCheckpoints[srcRep];\\n uint256 srcRepOld = srcRepNum != 0\\n ? getCheckpoint(srcRep, srcRepNum - 1).votes\\n : 0;\\n uint256 srcRepNew = srcRepOld - amount;\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n\\n if (dstRep != address(0)) {\\n uint256 dstRepNum = numCheckpoints[dstRep];\\n uint256 dstRepOld = dstRepNum != 0\\n ? getCheckpoint(dstRep, dstRepNum - 1).votes\\n : 0;\\n uint256 dstRepNew = dstRepOld + amount;\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n }\\n\\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\\n /// @param delegatee The address to snapshot\\n /// @param nCheckpoints The number of checkpoints delegatee has\\n /// @param oldVotes The number of votes the delegatee had\\n /// @param newVotes The number of votes the delegate has now\\n function _writeCheckpoint(\\n address delegatee,\\n uint256 nCheckpoints,\\n uint256 oldVotes,\\n uint256 newVotes\\n ) private {\\n uint32 timePoint = uint32(now());\\n\\n unchecked {\\n if (\\n nCheckpoints != 0 &&\\n checkpoints[delegatee][nCheckpoints - 1].fromTimePoint == timePoint\\n ) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(\\n timePoint,\\n newVotes\\n );\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /// @notice Returns the current timepoint.\\n /// @return timePoint returns unix epoch timestamp\\n function now() public view returns (uint256 timePoint) {\\n return block.timestamp;\\n }\\n\\n /// @notice Returns the prior number of `votes` for `account` as of `timePoint`.\\n /// @param account The user to check `votes` for.\\n /// @param timePoint The unix time to check `votes` for.\\n /// @return votes Past `votes` delegated to `account`.\\n function getPastVotes(address account, uint256 timePoint)\\n external\\n view\\n virtual\\n returns (uint256 votes)\\n {\\n require(timePoint < now(), \\\"!determined\\\"); /* Prior votes must be in the past*/\\n\\n uint256 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) return 0;\\n\\n unchecked {\\n if (\\n getCheckpoint(account, nCheckpoints - 1).fromTimePoint <=\\n timePoint\\n ) return getCheckpoint(account, nCheckpoints - 1).votes; /* If most recent checkpoint is at or after desired timepoint, return*/\\n if (getCheckpoint(account, 0).fromTimePoint > timePoint) return 0;\\n uint256 lower = 0;\\n uint256 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n /* Binary search to look for highest timePoint before desired timePoint*/\\n uint256 center = upper - (upper - lower) / 2;\\n Checkpoint memory cp = getCheckpoint(account, center);\\n if (cp.fromTimePoint == timePoint) return cp.votes;\\n else if (cp.fromTimePoint < timePoint) lower = center;\\n else upper = center - 1;\\n }\\n votes = getCheckpoint(account, lower).votes;\\n }\\n }\\n\\n /// @notice Returns the current delegated `vote` balance for `account`.\\n /// @param account The user to check delegated `votes` for.\\n /// @return votes Current `votes` delegated to `account`.\\n function getVotes(address account)\\n external\\n view\\n virtual\\n returns (uint256 votes)\\n {\\n uint256 nCheckpoints = numCheckpoints[account]; /*Get most recent checkpoint, or 0 if no checkpoints*/\\n unchecked {\\n votes = nCheckpoints != 0\\n ? getCheckpoint(account, nCheckpoints - 1).votes\\n : 0;\\n }\\n }\\n\\n function getCheckpoint(address delegatee, uint256 nCheckpoints)\\n public\\n view\\n virtual\\n returns (Checkpoint memory)\\n {\\n return checkpoints[delegatee][nCheckpoints];\\n }\\n}\\n\",\"keccak256\":\"0x2003d3afd190a6c73b8e29970cdd84f0deb9bc543ed63d058451020293486348\",\"license\":\"MIT\"},\"contracts/utils/DelegationEIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4Delegation}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract DelegationEIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME_DELEGATION;\\n bytes32 private _HASHED_VERSION_DELEGATION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained_delegation(name, version);\\n }\\n\\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME_DELEGATION = hashedName;\\n _HASHED_VERSION_DELEGATION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\\n }\\n\\n function _buildDomainSeparatorDelegation(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\\n return _HASHED_NAME_DELEGATION;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION_DELEGATION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xaaca6373c8a75310ffcbbd63e8d0689ab6e404c96366e3fa4158bd3957924089\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523060601b6080523480156200001857600080fd5b506200002362000029565b620000eb565b600054610100900460ff1615620000965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805160601c6133ef6200012660003960008181610891015281816108da01528181610c1801528181610c580152610ce701526133ef6000f3fe60806040526004361061023b5760003560e01c80635c19a95c1161012e5780639711715a116100ab578063a9059cbb1161006f578063a9059cbb14610705578063c3cda52014610725578063d505accf14610745578063dd62ed3e14610765578063f2fde38b1461078557600080fd5b80639711715a14610670578063981b24d0146106855780639ab24eb0146106a55780639dc29fac146106c5578063a457c2d7146106e557600080fd5b80637ecebe00116100f25780637ecebe00146105f45780638456cb59146106145780638abe09f2146106295780638da5cb5b1461063c57806395d89b411461065b57600080fd5b80635c19a95c146105425780635c975abb146105625780636fcfff451461057b57806370a08231146105a9578063715018a6146105df57600080fd5b80633a46b1a8116101bc5780634f1ef286116101805780634f1ef2861461049657806352d1902d146104a95780635439ad86146104be578063562d190d146104d3578063587cde1e146104f357600080fd5b80633a46b1a8146103e05780633f4ba83a1461040057806340c10f191461041557806347f761f5146104355780634ee2cd7e1461047657600080fd5b806323b872dd1161020357806323b872dd1461034d578063313ce5671461036d5780633644e515146103895780633659cfe61461039e57806339509351146103c057600080fd5b806303c8a3c61461024057806306fdde0314610281578063095ea7b3146102a35780630cdfebfa146102d357806318160ddd14610338575b600080fd5b34801561024c57600080fd5b5061026e61025b366004612eb7565b6101036020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561028d57600080fd5b506102966107a5565b6040516102789190613137565b3480156102af57600080fd5b506102c36102be36600461300d565b610837565b6040519015158152602001610278565b3480156102df57600080fd5b5061031c6102ee36600461300d565b6101006020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff9093168352602083019190915201610278565b34801561034457600080fd5b5060355461026e565b34801561035957600080fd5b506102c3610368366004612f05565b610851565b34801561037957600080fd5b5060405160128152602001610278565b34801561039557600080fd5b5061026e610877565b3480156103aa57600080fd5b506103be6103b9366004612eb7565b610886565b005b3480156103cc57600080fd5b506102c36103db36600461300d565b61096f565b3480156103ec57600080fd5b5061026e6103fb36600461300d565b610991565b34801561040c57600080fd5b506103be610ad2565b34801561042157600080fd5b506103be61043036600461300d565b610ae4565b34801561044157600080fd5b5061045561045036600461300d565b610b60565b60408051825163ffffffff1681526020928301519281019290925201610278565b34801561048257600080fd5b5061026e61049136600461300d565b610bb3565b6103be6104a4366004612fab565b610c0d565b3480156104b557600080fd5b5061026e610cda565b3480156104ca57600080fd5b5061026e610d8d565b3480156104df57600080fd5b506103be6104ee3660046130a8565b610d97565b3480156104ff57600080fd5b5061052a61050e366004612eb7565b610102602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b34801561054e57600080fd5b506103be61055d366004612eb7565b610fa2565b34801561056e57600080fd5b506101685460ff166102c3565b34801561058757600080fd5b5061026e610596366004612eb7565b6101016020526000908152604090205481565b3480156105b557600080fd5b5061026e6105c4366004612eb7565b6001600160a01b031660009081526033602052604090205490565b3480156105eb57600080fd5b506103be610fac565b34801561060057600080fd5b5061026e61060f366004612eb7565b610fbe565b34801561062057600080fd5b506103be610fdc565b34801561063557600080fd5b504261026e565b34801561064857600080fd5b50610136546001600160a01b031661052a565b34801561066757600080fd5b50610296610fec565b34801561067c57600080fd5b5061026e610ffb565b34801561069157600080fd5b5061026e6106a0366004613102565b61100d565b3480156106b157600080fd5b5061026e6106c0366004612eb7565b611039565b3480156106d157600080fd5b506103be6106e036600461300d565b611077565b3480156106f157600080fd5b506102c361070036600461300d565b611089565b34801561071157600080fd5b506102c361072036600461300d565b61110f565b34801561073157600080fd5b506103be610740366004613037565b61111d565b34801561075157600080fd5b506103be610760366004612f41565b611313565b34801561077157600080fd5b5061026e610780366004612ed2565b611477565b34801561079157600080fd5b506103be6107a0366004612eb7565b6114a2565b6060603680546107b4906132ca565b80601f01602080910402602001604051908101604052809291908181526020018280546107e0906132ca565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b5050505050905090565b600033610845818585611518565b60019150505b92915050565b60003361085f85828561163c565b61086a8585856116b6565b60019150505b9392505050565b600061088161186c565b905090565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108d85760405162461bcd60e51b81526004016108cf9061316a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610921600080516020613373833981519152546001600160a01b031690565b6001600160a01b0316146109475760405162461bcd60e51b81526004016108cf906131b6565b610950816118a3565b6040805160008082526020820190925261096c918391906118ab565b50565b6000336108458185856109828383611477565b61098c919061324d565b611518565b60004282106109d05760405162461bcd60e51b815260206004820152600b60248201526a0859195d195c9b5a5b995960aa1b60448201526064016108cf565b6001600160a01b03831660009081526101016020526040902054806109f957600091505061084b565b82610a078560018403610b60565b5163ffffffff1611610a2c57610a208460018303610b60565b6020015191505061084b565b82610a38856000610b60565b5163ffffffff161115610a4f57600091505061084b565b600060001982015b81811115610aba5760028282030481036000610a738883610b60565b805190915063ffffffff16871415610a955760200151945061084b9350505050565b805163ffffffff16871115610aac57819350610ab3565b6001820392505b5050610a57565b610ac48683610b60565b602001519695505050505050565b610ada611a25565b610ae2611a80565b565b610aec611a25565b610af96002600019613265565b81610b0360355490565b610b0d919061324d565b1115610b525760405162461bcd60e51b81526020600482015260146024820152731cda185c995cce8818d85c08195e18d95959195960621b60448201526064016108cf565b610b5c8282611ad3565b5050565b604080518082018252600080825260209182018190526001600160a01b039490941684526101008152818420928452918252918290208251808401909352805463ffffffff168352600101549082015290565b6001600160a01b03821660009081526101046020526040812081908190610bdb908590611ba0565b9150915081610c02576001600160a01b038516600090815260336020526040902054610c04565b805b95945050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610c565760405162461bcd60e51b81526004016108cf9061316a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c9f600080516020613373833981519152546001600160a01b031690565b6001600160a01b031614610cc55760405162461bcd60e51b81526004016108cf906131b6565b610cce826118a3565b610b5c828260016118ab565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d7a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108cf565b5060008051602061337383398151915290565b6000610881611c97565b600054610100900460ff1615808015610db75750600054600160ff909116105b80610dd15750303b158015610dd1575060005460ff166001145b610e345760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108cf565b6000805460ff191660011790558015610e57576000805461ff0019166101001790555b8251610e9a5760405162461bcd60e51b81526020600482015260126024820152717368617265733a206e616d6520656d70747960701b60448201526064016108cf565b8151610edf5760405162461bcd60e51b81526020600482015260146024820152737368617265733a2073796d626f6c20656d70747960601b60448201526064016108cf565b610ee98383611ca3565b610ef283611cd4565b610efa611d1e565b610f02611d4d565b610f0a611d74565b610f12611d4d565b610f576040518060400160405280600a8152602001693232b632b3b0ba34b7b760b11b815250604051806040016040528060018152602001600d60fa1b815250611da3565b8015610f9d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61096c3382611dd4565b610fb4611a25565b610ae26000611ecb565b6001600160a01b03811660009081526099602052604081205461084b565b610fe4611a25565b610ae2611f1e565b6060603780546107b4906132ca565b6000611005611a25565b610881611f5c565b600080600061101e84610105611ba0565b915091508161102f57603554611031565b805b949350505050565b6001600160a01b038116600090815261010160205260408120548061105f576000610870565b61106c8360018303610b60565b602001519392505050565b61107f611a25565b610b5c8282611fb7565b600033816110978286611477565b9050838110156110f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108cf565b6111048286868403611518565b506001949350505050565b6000336108458185856116b6565b8342111561116d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016108cf565b600061121661120e7f0e3bc21ca2be03aeeee0e614bfe98f970c96a05a768f627c50ab81764cb5026861119e6107a5565b6040516020016111ae919061311b565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905260c001604051602081830303815290604052805190602001206120f7565b858585612145565b90506001600160a01b03811661126e5760405162461bcd60e51b815260206004820181905260248201527f4552433230566f7465733a20696e76616c6964207369676e657220283078302960448201526064016108cf565b6001600160a01b0381166000908152610103602052604090205486146112d65760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016108cf565b6001600160a01b0381166000908152610103602052604081208054916112fb836132ff565b919050555061130a8188611dd4565b50505050505050565b834211156113635760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016108cf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113928c61216d565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006113ed82612195565b905060006113fd82878787612145565b9050896001600160a01b0316816001600160a01b0316146114605760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016108cf565b61146b8a8a8a611518565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6114aa611a25565b6001600160a01b03811661150f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108cf565b61096c81611ecb565b6001600160a01b03831661157a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108cf565b6001600160a01b0382166115db5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108cf565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006116488484611477565b905060001981146116b057818110156116a35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108cf565b6116b08484848403611518565b50505050565b6001600160a01b03831661171a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108cf565b6001600160a01b03821661177c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108cf565b6117878383836121a2565b6001600160a01b038316600090815260336020526040902054818110156117ff5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108cf565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061185f9086815260200190565b60405180910390a36116b0565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61189b60655490565b606654612233565b61096c611a25565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156118de57610f9d8361227c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191757600080fd5b505afa925050508015611947575060408051601f3d908101601f191682019092526119449181019061308f565b60015b6119aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016108cf565b6000805160206133738339815191528114611a195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016108cf565b50610f9d838383612318565b610136546001600160a01b03163314610ae25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108cf565b611a8861233d565b610168805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b295760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108cf565b611b35600083836121a2565b8060356000828254611b47919061324d565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60008060008411611bec5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016108cf565b611bf4611c97565b841115611c435760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016108cf565b6000611c4f8486612387565b8454909150811415611c68576000809250925050611c90565b6001846001018281548110611c7f57611c7f613346565b906000526020600020015492509250505b9250929050565b60006108816101075490565b600054610100900460ff16611cca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612432565b600054610100900460ff16611cfb5760405162461bcd60e51b81526004016108cf90613202565b61096c81604051806040016040528060018152602001603160f81b815250612480565b600054610100900460ff16611d455760405162461bcd60e51b81526004016108cf90613202565b610ae26124c1565b600054610100900460ff16610ae25760405162461bcd60e51b81526004016108cf90613202565b600054610100900460ff16611d9b5760405162461bcd60e51b81526004016108cf90613202565b610ae26124f5565b600054610100900460ff16611dca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612525565b6001600160a01b03821660009081526033602052604081205411611e245760405162461bcd60e51b81526020600482015260076024820152662173686172657360c81b60448201526064016108cf565b6001600160a01b0380831660009081526101026020526040902080548383166001600160a01b031982161790915516611e7c8183611e77866001600160a01b031660009081526033602052604090205490565b612566565b816001600160a01b0316816001600160a01b0316846001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4505050565b61013680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f2661264a565b610168805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ab63390565b6000611f6d61010780546001019055565b6000611f77611c97565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb6781604051611faa91815260200190565b60405180910390a1919050565b6001600160a01b0382166120175760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108cf565b612023826000836121a2565b6001600160a01b038216600090815260336020526040902054818110156120975760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108cf565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600061084b612104612691565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612156878787876126c8565b915091506121638161278c565b5095945050505050565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b600061084b61210461186c565b6121ad8383836128da565b6001600160a01b03831615806121e05750610136546001600160a01b0316331480156121e057506001600160a01b038216155b806121ef57506101685460ff16155b610f9d5760405162461bcd60e51b81526020600482015260156024820152747368617265733a20217472616e7366657261626c6560581b60448201526064016108cf565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b0381163b6122e95760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016108cf565b60008051602061337383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6123218361292d565b60008251118061232e5750805b15610f9d576116b0838361296d565b6101685460ff16610ae25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108cf565b81546000906123985750600061084b565b82546000905b808210156123e55760006123b28383612a58565b600087815260209020909150859082015411156123d1578091506123df565b6123dc81600161324d565b92505b5061239e565b60008211801561241157508361240e86612400600186613287565b600091825260209091200190565b54145b1561242a57612421600183613287565b9250505061084b565b50905061084b565b600054610100900460ff166124595760405162461bcd60e51b81526004016108cf90613202565b815161246c906036906020850190612d60565b508051610f9d906037906020840190612d60565b600054610100900460ff166124a75760405162461bcd60e51b81526004016108cf90613202565b815160209283012081519190920120606591909155606655565b600054610100900460ff166124e85760405162461bcd60e51b81526004016108cf90613202565b610168805460ff19169055565b600054610100900460ff1661251c5760405162461bcd60e51b81526004016108cf90613202565b610ae233611ecb565b600054610100900460ff1661254c5760405162461bcd60e51b81526004016108cf90613202565b81516020928301208151919092012060cc9190915560cd55565b816001600160a01b0316836001600160a01b03161415801561258757508015155b15610f9d576001600160a01b038316156125e9576001600160a01b0383166000908152610101602052604081205490816125c25760006125d4565b6125cf8560018403610b60565b602001515b90508281036125e586848484612a73565b5050505b6001600160a01b03821615610f9d576001600160a01b03821660009081526101016020526040812054908161261f576000612631565b61262c8460018403610b60565b602001515b905082810161264285848484612a73565b505050505050565b6101685460ff1615610ae25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108cf565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6126c060cc5490565b60cd54612233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126ff5750600090506003612783565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612753573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661277c57600060019250925050612783565b9150600090505b94509492505050565b60008160048111156127a0576127a0613330565b14156127a95750565b60018160048111156127bd576127bd613330565b141561280b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108cf565b600281600481111561281f5761281f613330565b141561286d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108cf565b600381600481111561288157612881613330565b141561096c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108cf565b6128e5838383612b9c565b6001600160a01b038316612904576128fc82612c48565b610f9d612c7c565b6001600160a01b03821661291b576128fc83612c48565b61292483612c48565b610f9d82612c48565b6129368161227c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6129d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016108cf565b600080846001600160a01b0316846040516129f0919061311b565b600060405180830381855af49150503d8060008114612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b5091509150610c04828260405180606001604052806027815260200161339360279139612c8b565b6000612a676002848418613265565b6108709084841661324d565b428315801590612ab357506001600160a01b0385166000908152610100602090815260408083206000198801845290915290205463ffffffff8281169116145b15612aeb576001600160a01b038516600090815261010060209081526040808320600019880184529091529020600101829055612b51565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a16600081815261010084528681208b825284528681209551865463ffffffff191695169490941785559051600194850155825261010190529190912090850190555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6001600160a01b038216600090815260336020526040902054158015612bd957506001600160a01b03821660009081526101016020526040902054155b8015612be55750600081115b15612c15576001600160a01b03821660008181526101026020526040902080546001600160a01b03191690911790555b6001600160a01b0380841660009081526101026020526040808220548584168352912054610f9d92918216911683612566565b6001600160a01b03811660009081526101046020908152604080832060339092529091205461096c9190612ca4565b612ca4565b610ae2610105612c7760355490565b60608315612c9a575081610870565b6108708383612cee565b6000612cae611c97565b905080612cba84612d18565b1015610f9d578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b815115612cfe5781518083602001fd5b8060405162461bcd60e51b81526004016108cf9190613137565b8054600090612d2957506000919050565b81548290612d3990600190613287565b81548110612d4957612d49613346565b90600052602060002001549050919050565b919050565b828054612d6c906132ca565b90600052602060002090601f016020900481019282612d8e5760008555612dd4565b82601f10612da757805160ff1916838001178555612dd4565b82800160010185558215612dd4579182015b82811115612dd4578251825591602001919060010190612db9565b50612de0929150612de4565b5090565b5b80821115612de05760008155600101612de5565b600067ffffffffffffffff80841115612e1457612e1461335c565b604051601f8501601f19908116603f01168101908282118183101715612e3c57612e3c61335c565b81604052809350858152868686011115612e5557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612d5b57600080fd5b600082601f830112612e9757600080fd5b61087083833560208501612df9565b803560ff81168114612d5b57600080fd5b600060208284031215612ec957600080fd5b61087082612e6f565b60008060408385031215612ee557600080fd5b612eee83612e6f565b9150612efc60208401612e6f565b90509250929050565b600080600060608486031215612f1a57600080fd5b612f2384612e6f565b9250612f3160208501612e6f565b9150604084013590509250925092565b600080600080600080600060e0888a031215612f5c57600080fd5b612f6588612e6f565b9650612f7360208901612e6f565b95506040880135945060608801359350612f8f60808901612ea6565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612fbe57600080fd5b612fc783612e6f565b9150602083013567ffffffffffffffff811115612fe357600080fd5b8301601f81018513612ff457600080fd5b61300385823560208401612df9565b9150509250929050565b6000806040838503121561302057600080fd5b61302983612e6f565b946020939093013593505050565b60008060008060008060c0878903121561305057600080fd5b61305987612e6f565b9550602087013594506040870135935061307560608801612ea6565b92506080870135915060a087013590509295509295509295565b6000602082840312156130a157600080fd5b5051919050565b600080604083850312156130bb57600080fd5b823567ffffffffffffffff808211156130d357600080fd5b6130df86838701612e86565b935060208501359150808211156130f557600080fd5b5061300385828601612e86565b60006020828403121561311457600080fd5b5035919050565b6000825161312d81846020870161329e565b9190910192915050565b602081526000825180602084015261315681604085016020870161329e565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156132605761326061331a565b500190565b60008261328257634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156132995761329961331a565b500390565b60005b838110156132b95781810151838201526020016132a1565b838111156116b05750506000910152565b600181811c908216806132de57607f821691505b6020821081141561218f57634e487b7160e01b600052602260045260246000fd5b60006000198214156133135761331361331a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200d1020c104d072d10e2125586128096b7567b61064dc9301fdd4980fc317d26464736f6c63430008070033", + "deployedBytecode": "0x60806040526004361061023b5760003560e01c80635c19a95c1161012e5780639711715a116100ab578063a9059cbb1161006f578063a9059cbb14610705578063c3cda52014610725578063d505accf14610745578063dd62ed3e14610765578063f2fde38b1461078557600080fd5b80639711715a14610670578063981b24d0146106855780639ab24eb0146106a55780639dc29fac146106c5578063a457c2d7146106e557600080fd5b80637ecebe00116100f25780637ecebe00146105f45780638456cb59146106145780638abe09f2146106295780638da5cb5b1461063c57806395d89b411461065b57600080fd5b80635c19a95c146105425780635c975abb146105625780636fcfff451461057b57806370a08231146105a9578063715018a6146105df57600080fd5b80633a46b1a8116101bc5780634f1ef286116101805780634f1ef2861461049657806352d1902d146104a95780635439ad86146104be578063562d190d146104d3578063587cde1e146104f357600080fd5b80633a46b1a8146103e05780633f4ba83a1461040057806340c10f191461041557806347f761f5146104355780634ee2cd7e1461047657600080fd5b806323b872dd1161020357806323b872dd1461034d578063313ce5671461036d5780633644e515146103895780633659cfe61461039e57806339509351146103c057600080fd5b806303c8a3c61461024057806306fdde0314610281578063095ea7b3146102a35780630cdfebfa146102d357806318160ddd14610338575b600080fd5b34801561024c57600080fd5b5061026e61025b366004612eb7565b6101036020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561028d57600080fd5b506102966107a5565b6040516102789190613137565b3480156102af57600080fd5b506102c36102be36600461300d565b610837565b6040519015158152602001610278565b3480156102df57600080fd5b5061031c6102ee36600461300d565b6101006020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff9093168352602083019190915201610278565b34801561034457600080fd5b5060355461026e565b34801561035957600080fd5b506102c3610368366004612f05565b610851565b34801561037957600080fd5b5060405160128152602001610278565b34801561039557600080fd5b5061026e610877565b3480156103aa57600080fd5b506103be6103b9366004612eb7565b610886565b005b3480156103cc57600080fd5b506102c36103db36600461300d565b61096f565b3480156103ec57600080fd5b5061026e6103fb36600461300d565b610991565b34801561040c57600080fd5b506103be610ad2565b34801561042157600080fd5b506103be61043036600461300d565b610ae4565b34801561044157600080fd5b5061045561045036600461300d565b610b60565b60408051825163ffffffff1681526020928301519281019290925201610278565b34801561048257600080fd5b5061026e61049136600461300d565b610bb3565b6103be6104a4366004612fab565b610c0d565b3480156104b557600080fd5b5061026e610cda565b3480156104ca57600080fd5b5061026e610d8d565b3480156104df57600080fd5b506103be6104ee3660046130a8565b610d97565b3480156104ff57600080fd5b5061052a61050e366004612eb7565b610102602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610278565b34801561054e57600080fd5b506103be61055d366004612eb7565b610fa2565b34801561056e57600080fd5b506101685460ff166102c3565b34801561058757600080fd5b5061026e610596366004612eb7565b6101016020526000908152604090205481565b3480156105b557600080fd5b5061026e6105c4366004612eb7565b6001600160a01b031660009081526033602052604090205490565b3480156105eb57600080fd5b506103be610fac565b34801561060057600080fd5b5061026e61060f366004612eb7565b610fbe565b34801561062057600080fd5b506103be610fdc565b34801561063557600080fd5b504261026e565b34801561064857600080fd5b50610136546001600160a01b031661052a565b34801561066757600080fd5b50610296610fec565b34801561067c57600080fd5b5061026e610ffb565b34801561069157600080fd5b5061026e6106a0366004613102565b61100d565b3480156106b157600080fd5b5061026e6106c0366004612eb7565b611039565b3480156106d157600080fd5b506103be6106e036600461300d565b611077565b3480156106f157600080fd5b506102c361070036600461300d565b611089565b34801561071157600080fd5b506102c361072036600461300d565b61110f565b34801561073157600080fd5b506103be610740366004613037565b61111d565b34801561075157600080fd5b506103be610760366004612f41565b611313565b34801561077157600080fd5b5061026e610780366004612ed2565b611477565b34801561079157600080fd5b506103be6107a0366004612eb7565b6114a2565b6060603680546107b4906132ca565b80601f01602080910402602001604051908101604052809291908181526020018280546107e0906132ca565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b5050505050905090565b600033610845818585611518565b60019150505b92915050565b60003361085f85828561163c565b61086a8585856116b6565b60019150505b9392505050565b600061088161186c565b905090565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156108d85760405162461bcd60e51b81526004016108cf9061316a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610921600080516020613373833981519152546001600160a01b031690565b6001600160a01b0316146109475760405162461bcd60e51b81526004016108cf906131b6565b610950816118a3565b6040805160008082526020820190925261096c918391906118ab565b50565b6000336108458185856109828383611477565b61098c919061324d565b611518565b60004282106109d05760405162461bcd60e51b815260206004820152600b60248201526a0859195d195c9b5a5b995960aa1b60448201526064016108cf565b6001600160a01b03831660009081526101016020526040902054806109f957600091505061084b565b82610a078560018403610b60565b5163ffffffff1611610a2c57610a208460018303610b60565b6020015191505061084b565b82610a38856000610b60565b5163ffffffff161115610a4f57600091505061084b565b600060001982015b81811115610aba5760028282030481036000610a738883610b60565b805190915063ffffffff16871415610a955760200151945061084b9350505050565b805163ffffffff16871115610aac57819350610ab3565b6001820392505b5050610a57565b610ac48683610b60565b602001519695505050505050565b610ada611a25565b610ae2611a80565b565b610aec611a25565b610af96002600019613265565b81610b0360355490565b610b0d919061324d565b1115610b525760405162461bcd60e51b81526020600482015260146024820152731cda185c995cce8818d85c08195e18d95959195960621b60448201526064016108cf565b610b5c8282611ad3565b5050565b604080518082018252600080825260209182018190526001600160a01b039490941684526101008152818420928452918252918290208251808401909352805463ffffffff168352600101549082015290565b6001600160a01b03821660009081526101046020526040812081908190610bdb908590611ba0565b9150915081610c02576001600160a01b038516600090815260336020526040902054610c04565b805b95945050505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610c565760405162461bcd60e51b81526004016108cf9061316a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c9f600080516020613373833981519152546001600160a01b031690565b6001600160a01b031614610cc55760405162461bcd60e51b81526004016108cf906131b6565b610cce826118a3565b610b5c828260016118ab565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d7a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108cf565b5060008051602061337383398151915290565b6000610881611c97565b600054610100900460ff1615808015610db75750600054600160ff909116105b80610dd15750303b158015610dd1575060005460ff166001145b610e345760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108cf565b6000805460ff191660011790558015610e57576000805461ff0019166101001790555b8251610e9a5760405162461bcd60e51b81526020600482015260126024820152717368617265733a206e616d6520656d70747960701b60448201526064016108cf565b8151610edf5760405162461bcd60e51b81526020600482015260146024820152737368617265733a2073796d626f6c20656d70747960601b60448201526064016108cf565b610ee98383611ca3565b610ef283611cd4565b610efa611d1e565b610f02611d4d565b610f0a611d74565b610f12611d4d565b610f576040518060400160405280600a8152602001693232b632b3b0ba34b7b760b11b815250604051806040016040528060018152602001600d60fa1b815250611da3565b8015610f9d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61096c3382611dd4565b610fb4611a25565b610ae26000611ecb565b6001600160a01b03811660009081526099602052604081205461084b565b610fe4611a25565b610ae2611f1e565b6060603780546107b4906132ca565b6000611005611a25565b610881611f5c565b600080600061101e84610105611ba0565b915091508161102f57603554611031565b805b949350505050565b6001600160a01b038116600090815261010160205260408120548061105f576000610870565b61106c8360018303610b60565b602001519392505050565b61107f611a25565b610b5c8282611fb7565b600033816110978286611477565b9050838110156110f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108cf565b6111048286868403611518565b506001949350505050565b6000336108458185856116b6565b8342111561116d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016108cf565b600061121661120e7f0e3bc21ca2be03aeeee0e614bfe98f970c96a05a768f627c50ab81764cb5026861119e6107a5565b6040516020016111ae919061311b565b60408051601f198184030181528282528051602091820120908301939093528101919091526001600160a01b038a1660608201526080810189905260a0810188905260c001604051602081830303815290604052805190602001206120f7565b858585612145565b90506001600160a01b03811661126e5760405162461bcd60e51b815260206004820181905260248201527f4552433230566f7465733a20696e76616c6964207369676e657220283078302960448201526064016108cf565b6001600160a01b0381166000908152610103602052604090205486146112d65760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016108cf565b6001600160a01b0381166000908152610103602052604081208054916112fb836132ff565b919050555061130a8188611dd4565b50505050505050565b834211156113635760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016108cf565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886113928c61216d565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006113ed82612195565b905060006113fd82878787612145565b9050896001600160a01b0316816001600160a01b0316146114605760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016108cf565b61146b8a8a8a611518565b50505050505050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6114aa611a25565b6001600160a01b03811661150f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108cf565b61096c81611ecb565b6001600160a01b03831661157a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108cf565b6001600160a01b0382166115db5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108cf565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006116488484611477565b905060001981146116b057818110156116a35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108cf565b6116b08484848403611518565b50505050565b6001600160a01b03831661171a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108cf565b6001600160a01b03821661177c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108cf565b6117878383836121a2565b6001600160a01b038316600090815260336020526040902054818110156117ff5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108cf565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061185f9086815260200190565b60405180910390a36116b0565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61189b60655490565b606654612233565b61096c611a25565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156118de57610f9d8361227c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561191757600080fd5b505afa925050508015611947575060408051601f3d908101601f191682019092526119449181019061308f565b60015b6119aa5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016108cf565b6000805160206133738339815191528114611a195760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016108cf565b50610f9d838383612318565b610136546001600160a01b03163314610ae25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108cf565b611a8861233d565b610168805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611b295760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108cf565b611b35600083836121a2565b8060356000828254611b47919061324d565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60008060008411611bec5760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016108cf565b611bf4611c97565b841115611c435760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016108cf565b6000611c4f8486612387565b8454909150811415611c68576000809250925050611c90565b6001846001018281548110611c7f57611c7f613346565b906000526020600020015492509250505b9250929050565b60006108816101075490565b600054610100900460ff16611cca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612432565b600054610100900460ff16611cfb5760405162461bcd60e51b81526004016108cf90613202565b61096c81604051806040016040528060018152602001603160f81b815250612480565b600054610100900460ff16611d455760405162461bcd60e51b81526004016108cf90613202565b610ae26124c1565b600054610100900460ff16610ae25760405162461bcd60e51b81526004016108cf90613202565b600054610100900460ff16611d9b5760405162461bcd60e51b81526004016108cf90613202565b610ae26124f5565b600054610100900460ff16611dca5760405162461bcd60e51b81526004016108cf90613202565b610b5c8282612525565b6001600160a01b03821660009081526033602052604081205411611e245760405162461bcd60e51b81526020600482015260076024820152662173686172657360c81b60448201526064016108cf565b6001600160a01b0380831660009081526101026020526040902080548383166001600160a01b031982161790915516611e7c8183611e77866001600160a01b031660009081526033602052604090205490565b612566565b816001600160a01b0316816001600160a01b0316846001600160a01b03167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4505050565b61013680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f2661264a565b610168805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ab63390565b6000611f6d61010780546001019055565b6000611f77611c97565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb6781604051611faa91815260200190565b60405180910390a1919050565b6001600160a01b0382166120175760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108cf565b612023826000836121a2565b6001600160a01b038216600090815260336020526040902054818110156120975760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108cf565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600061084b612104612691565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000612156878787876126c8565b915091506121638161278c565b5095945050505050565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b600061084b61210461186c565b6121ad8383836128da565b6001600160a01b03831615806121e05750610136546001600160a01b0316331480156121e057506001600160a01b038216155b806121ef57506101685460ff16155b610f9d5760405162461bcd60e51b81526020600482015260156024820152747368617265733a20217472616e7366657261626c6560581b60448201526064016108cf565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6001600160a01b0381163b6122e95760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016108cf565b60008051602061337383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6123218361292d565b60008251118061232e5750805b15610f9d576116b0838361296d565b6101685460ff16610ae25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108cf565b81546000906123985750600061084b565b82546000905b808210156123e55760006123b28383612a58565b600087815260209020909150859082015411156123d1578091506123df565b6123dc81600161324d565b92505b5061239e565b60008211801561241157508361240e86612400600186613287565b600091825260209091200190565b54145b1561242a57612421600183613287565b9250505061084b565b50905061084b565b600054610100900460ff166124595760405162461bcd60e51b81526004016108cf90613202565b815161246c906036906020850190612d60565b508051610f9d906037906020840190612d60565b600054610100900460ff166124a75760405162461bcd60e51b81526004016108cf90613202565b815160209283012081519190920120606591909155606655565b600054610100900460ff166124e85760405162461bcd60e51b81526004016108cf90613202565b610168805460ff19169055565b600054610100900460ff1661251c5760405162461bcd60e51b81526004016108cf90613202565b610ae233611ecb565b600054610100900460ff1661254c5760405162461bcd60e51b81526004016108cf90613202565b81516020928301208151919092012060cc9190915560cd55565b816001600160a01b0316836001600160a01b03161415801561258757508015155b15610f9d576001600160a01b038316156125e9576001600160a01b0383166000908152610101602052604081205490816125c25760006125d4565b6125cf8560018403610b60565b602001515b90508281036125e586848484612a73565b5050505b6001600160a01b03821615610f9d576001600160a01b03821660009081526101016020526040812054908161261f576000612631565b61262c8460018403610b60565b602001515b905082810161264285848484612a73565b505050505050565b6101685460ff1615610ae25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108cf565b60006108817f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6126c060cc5490565b60cd54612233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126ff5750600090506003612783565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612753573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661277c57600060019250925050612783565b9150600090505b94509492505050565b60008160048111156127a0576127a0613330565b14156127a95750565b60018160048111156127bd576127bd613330565b141561280b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108cf565b600281600481111561281f5761281f613330565b141561286d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108cf565b600381600481111561288157612881613330565b141561096c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108cf565b6128e5838383612b9c565b6001600160a01b038316612904576128fc82612c48565b610f9d612c7c565b6001600160a01b03821661291b576128fc83612c48565b61292483612c48565b610f9d82612c48565b6129368161227c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6129d55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016108cf565b600080846001600160a01b0316846040516129f0919061311b565b600060405180830381855af49150503d8060008114612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b5091509150610c04828260405180606001604052806027815260200161339360279139612c8b565b6000612a676002848418613265565b6108709084841661324d565b428315801590612ab357506001600160a01b0385166000908152610100602090815260408083206000198801845290915290205463ffffffff8281169116145b15612aeb576001600160a01b038516600090815261010060209081526040808320600019880184529091529020600101829055612b51565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a16600081815261010084528681208b825284528681209551865463ffffffff191695169490941785559051600194850155825261010190529190912090850190555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6001600160a01b038216600090815260336020526040902054158015612bd957506001600160a01b03821660009081526101016020526040902054155b8015612be55750600081115b15612c15576001600160a01b03821660008181526101026020526040902080546001600160a01b03191690911790555b6001600160a01b0380841660009081526101026020526040808220548584168352912054610f9d92918216911683612566565b6001600160a01b03811660009081526101046020908152604080832060339092529091205461096c9190612ca4565b612ca4565b610ae2610105612c7760355490565b60608315612c9a575081610870565b6108708383612cee565b6000612cae611c97565b905080612cba84612d18565b1015610f9d578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b815115612cfe5781518083602001fd5b8060405162461bcd60e51b81526004016108cf9190613137565b8054600090612d2957506000919050565b81548290612d3990600190613287565b81548110612d4957612d49613346565b90600052602060002001549050919050565b919050565b828054612d6c906132ca565b90600052602060002090601f016020900481019282612d8e5760008555612dd4565b82601f10612da757805160ff1916838001178555612dd4565b82800160010185558215612dd4579182015b82811115612dd4578251825591602001919060010190612db9565b50612de0929150612de4565b5090565b5b80821115612de05760008155600101612de5565b600067ffffffffffffffff80841115612e1457612e1461335c565b604051601f8501601f19908116603f01168101908282118183101715612e3c57612e3c61335c565b81604052809350858152868686011115612e5557600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612d5b57600080fd5b600082601f830112612e9757600080fd5b61087083833560208501612df9565b803560ff81168114612d5b57600080fd5b600060208284031215612ec957600080fd5b61087082612e6f565b60008060408385031215612ee557600080fd5b612eee83612e6f565b9150612efc60208401612e6f565b90509250929050565b600080600060608486031215612f1a57600080fd5b612f2384612e6f565b9250612f3160208501612e6f565b9150604084013590509250925092565b600080600080600080600060e0888a031215612f5c57600080fd5b612f6588612e6f565b9650612f7360208901612e6f565b95506040880135945060608801359350612f8f60808901612ea6565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612fbe57600080fd5b612fc783612e6f565b9150602083013567ffffffffffffffff811115612fe357600080fd5b8301601f81018513612ff457600080fd5b61300385823560208401612df9565b9150509250929050565b6000806040838503121561302057600080fd5b61302983612e6f565b946020939093013593505050565b60008060008060008060c0878903121561305057600080fd5b61305987612e6f565b9550602087013594506040870135935061307560608801612ea6565b92506080870135915060a087013590509295509295509295565b6000602082840312156130a157600080fd5b5051919050565b600080604083850312156130bb57600080fd5b823567ffffffffffffffff808211156130d357600080fd5b6130df86838701612e86565b935060208501359150808211156130f557600080fd5b5061300385828601612e86565b60006020828403121561311457600080fd5b5035919050565b6000825161312d81846020870161329e565b9190910192915050565b602081526000825180602084015261315681604085016020870161329e565b601f01601f19169190910160400192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156132605761326061331a565b500190565b60008261328257634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156132995761329961331a565b500390565b60005b838110156132b95781810151838201526020016132a1565b838111156116b05750506000910152565b600181811c908216806132de57607f821691505b6020821081141561218f57634e487b7160e01b600052602260045260246000fd5b60006000198214156133135761331361331a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200d1020c104d072d10e2125586128096b7567b61064dc9301fdd4980fc317d26464736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "balanceOfAt(address,uint256)": { + "details": "Retrieves the balance of `account` at the time `snapshotId` was created." + }, + "burn(address,uint256)": { + "params": { + "account": "Address to lose shares", + "amount": "Amount to burn" + } + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "delegate(address)": { + "params": { + "delegatee": "The address to delegate votes to." + } + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "params": { + "delegatee": "The address to delegate 'votes' to.", + "expiry": "The time at which to expire the signature.", + "nonce": "The contract state required to match the signature.", + "r": "The r signature", + "s": "The s signature", + "v": "The v signature" + } + }, + "getPastVotes(address,uint256)": { + "params": { + "account": "The user to check `votes` for.", + "timePoint": "The unix time to check `votes` for." + }, + "returns": { + "votes": "Past `votes` delegated to `account`." + } + }, + "getVotes(address)": { + "params": { + "account": "The user to check delegated `votes` for." + }, + "returns": { + "votes": "Current `votes` delegated to `account`." + } + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "mint(address,uint256)": { + "params": { + "amount": "Amount to mint", + "recipient": "Address to receive shares" + } + }, + "name()": { + "details": "Returns the name of the token." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "now()": { + "returns": { + "timePoint": "returns unix epoch timestamp" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setUp(string,string)": { + "details": "initializer should prevent this from being called again", + "params": { + "name_": "Name for ERC20 token trackers", + "symbol_": "Symbol for ERC20 token trackers" + } + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "totalSupplyAt(uint256)": { + "details": "Retrieves the total supply at the time `snapshotId` was created." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "title": "Shares", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burn(address,uint256)": { + "notice": "Baal-only function to burn shares." + }, + "delegate(address)": { + "notice": "Delegate votes from user to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "notice": "Delegates votes from `signer` to `delegatee` with EIP-712 signature." + }, + "getCurrentSnapshotId()": { + "notice": "get current SnapshotId" + }, + "getPastVotes(address,uint256)": { + "notice": "Returns the prior number of `votes` for `account` as of `timePoint`." + }, + "getVotes(address)": { + "notice": "Returns the current delegated `vote` balance for `account`." + }, + "mint(address,uint256)": { + "notice": "Baal-only function to mint shares." + }, + "now()": { + "notice": "Returns the current timepoint." + }, + "pause()": { + "notice": "Baal-only function to pause shares." + }, + "setUp(string,string)": { + "notice": "Configure shares - called by Baal on summon" + }, + "snapshot()": { + "notice": "Allows baal to create a snapshot" + }, + "unpause()": { + "notice": "Baal-only function to unpause shares." + } + }, + "notice": "Accounting for Baal non voting shares", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4454, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 4457, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6723, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4971, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 4977, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 4979, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256" + }, + { + "astId": 4981, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage" + }, + { + "astId": 4983, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage" + }, + { + "astId": 5563, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 7403, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "101", + "type": "t_bytes32" + }, + { + "astId": 7405, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "102", + "type": "t_bytes32" + }, + { + "astId": 7543, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6041, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_nonces", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_address,t_struct(Counter)6730_storage)" + }, + { + "astId": 6049, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "154", + "type": "t_bytes32" + }, + { + "astId": 6205, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 16164, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_NAME_DELEGATION", + "offset": 0, + "slot": "204", + "type": "t_bytes32" + }, + { + "astId": 16166, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_HASHED_VERSION_DELEGATION", + "offset": 0, + "slot": "205", + "type": "t_bytes32" + }, + { + "astId": 16304, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "206", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 15565, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "checkpoints", + "offset": 0, + "slot": "256", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)15558_storage))" + }, + { + "astId": 15569, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "numCheckpoints", + "offset": 0, + "slot": "257", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 15573, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "delegates", + "offset": 0, + "slot": "258", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 15577, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "delegationNonces", + "offset": 0, + "slot": "259", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5685, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_accountBalanceSnapshots", + "offset": 0, + "slot": "260", + "type": "t_mapping(t_address,t_struct(Snapshots)5680_storage)" + }, + { + "astId": 5688, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_totalSupplySnapshots", + "offset": 0, + "slot": "261", + "type": "t_struct(Snapshots)5680_storage" + }, + { + "astId": 5691, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_currentSnapshotId", + "offset": 0, + "slot": "263", + "type": "t_struct(Counter)6730_storage" + }, + { + "astId": 5989, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "264", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 3937, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_owner", + "offset": 0, + "slot": "310", + "type": "t_address" + }, + { + "astId": 4057, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "311", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4773, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_paused", + "offset": 0, + "slot": "360", + "type": "t_bool" + }, + { + "astId": 4878, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "361", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4436, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "410", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4751, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "__gap", + "offset": 0, + "slot": "460", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)15558_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct BaalVotes.Checkpoint))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Checkpoint)15558_storage)" + }, + "t_mapping(t_address,t_struct(Counter)6730_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)6730_storage" + }, + "t_mapping(t_address,t_struct(Snapshots)5680_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC20SnapshotUpgradeable.Snapshots)", + "numberOfBytes": "32", + "value": "t_struct(Snapshots)5680_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_struct(Checkpoint)15558_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct BaalVotes.Checkpoint)", + "numberOfBytes": "32", + "value": "t_struct(Checkpoint)15558_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)15558_storage": { + "encoding": "inplace", + "label": "struct BaalVotes.Checkpoint", + "members": [ + { + "astId": 15555, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "fromTimePoint", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 15557, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "votes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)6730_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 6729, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Snapshots)5680_storage": { + "encoding": "inplace", + "label": "struct ERC20SnapshotUpgradeable.Snapshots", + "members": [ + { + "astId": 5676, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "ids", + "offset": 0, + "slot": "0", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 5679, + "contract": "contracts/SharesERC20.sol:Shares", + "label": "values", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/TributeMinion.json b/deployments/sepolia/TributeMinion.json new file mode 100644 index 0000000..b9eee4e --- /dev/null +++ b/deployments/sepolia/TributeMinion.json @@ -0,0 +1,355 @@ +{ + "address": "0xdb4D89F2199b9Cf451B7Ff4bdC94b1c96De4bdD0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "applicant", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "safe", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EscrowReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "TributeProposal", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "baal", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loot", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint32", + "name": "proposalId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + } + ], + "name": "encodeTributeProposal", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "escrows", + "outputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "applicant", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "released", + "type": "bool" + }, + { + "internalType": "address", + "name": "safe", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_baal", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_proposalId", + "type": "uint32" + } + ], + "name": "releaseEscrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Baal", + "name": "baal", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loot", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "expiration", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "baalgas", + "type": "uint256" + }, + { + "internalType": "string", + "name": "details", + "type": "string" + } + ], + "name": "submitTributeProposal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x83d951a217b23d9b9f28a677ebd73c90e5a97bca6c17ac937a1dd9e8ab36ee08", + "receipt": { + "to": null, + "from": "0x7C510aBf45c10a9aB949ef69ccBba5d77312d814", + "contractAddress": "0xdb4D89F2199b9Cf451B7Ff4bdC94b1c96De4bdD0", + "transactionIndex": 44, + "gasUsed": "886041", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0ad02119f59906449be97c9075834315f686e025f0e859c3e0daf88243447f68", + "transactionHash": "0x83d951a217b23d9b9f28a677ebd73c90e5a97bca6c17ac937a1dd9e8ab36ee08", + "logs": [], + "blockNumber": 4816755, + "cumulativeGasUsed": "5370076", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d833871936d16a85338aeeebf4887b62", + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"applicant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EscrowReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"proposalId\",\"type\":\"uint256\"}],\"name\":\"TributeProposal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"baal\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loot\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"proposalId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"escrow\",\"type\":\"address\"}],\"name\":\"encodeTributeProposal\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"escrows\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"applicant\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"released\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"safe\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_baal\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_proposalId\",\"type\":\"uint32\"}],\"name\":\"releaseEscrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract Baal\",\"name\":\"baal\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loot\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"expiration\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"baalgas\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"submitTributeProposal\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tools/TributeMinion.sol\":\"TributeMinion\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"./base/ModuleManager.sol\\\";\\nimport \\\"./base/OwnerManager.sol\\\";\\nimport \\\"./base/FallbackManager.sol\\\";\\nimport \\\"./base/GuardManager.sol\\\";\\nimport \\\"./common/EtherPaymentFallback.sol\\\";\\nimport \\\"./common/Singleton.sol\\\";\\nimport \\\"./common/SignatureDecoder.sol\\\";\\nimport \\\"./common/SecuredTokenTransfer.sol\\\";\\nimport \\\"./common/StorageAccessible.sol\\\";\\nimport \\\"./interfaces/ISignatureValidator.sol\\\";\\nimport \\\"./external/GnosisSafeMath.sol\\\";\\n\\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract GnosisSafe is\\n EtherPaymentFallback,\\n Singleton,\\n ModuleManager,\\n OwnerManager,\\n SignatureDecoder,\\n SecuredTokenTransfer,\\n ISignatureValidatorConstants,\\n FallbackManager,\\n StorageAccessible,\\n GuardManager\\n{\\n using GnosisSafeMath for uint256;\\n\\n string public constant VERSION = \\\"1.3.0\\\";\\n\\n // keccak256(\\n // \\\"EIP712Domain(uint256 chainId,address verifyingContract)\\\"\\n // );\\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\\n\\n // keccak256(\\n // \\\"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\\\"\\n // );\\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\\n\\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\\n event SignMsg(bytes32 indexed msgHash);\\n event ExecutionFailure(bytes32 txHash, uint256 payment);\\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\\n\\n uint256 public nonce;\\n bytes32 private _deprecatedDomainSeparator;\\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\\n mapping(bytes32 => uint256) public signedMessages;\\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\\n\\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\\n constructor() {\\n // By setting the threshold it is not possible to call setup anymore,\\n // so we create a Safe with 0 owners and threshold 1.\\n // This is an unusable Safe, perfect for the singleton\\n threshold = 1;\\n }\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n /// @param to Contract address for optional delegate call.\\n /// @param data Data payload for optional delegate call.\\n /// @param fallbackHandler Handler for fallback calls to this contract\\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\\n /// @param payment Value that should be paid\\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\\n function setup(\\n address[] calldata _owners,\\n uint256 _threshold,\\n address to,\\n bytes calldata data,\\n address fallbackHandler,\\n address paymentToken,\\n uint256 payment,\\n address payable paymentReceiver\\n ) external {\\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\\n setupOwners(_owners, _threshold);\\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\\n setupModules(to, data);\\n\\n if (payment > 0) {\\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\\n }\\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\\n }\\n\\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\\n /// Note: The fees are always transferred, even if the user transaction fails.\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @param safeTxGas Gas that should be used for the Safe transaction.\\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Gas price that should be used for the payment calculation.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\\n function execTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures\\n ) public payable virtual returns (bool success) {\\n bytes32 txHash;\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n bytes memory txHashData =\\n encodeTransactionData(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n nonce\\n );\\n // Increase nonce and execute transaction.\\n nonce++;\\n txHash = keccak256(txHashData);\\n checkSignatures(txHash, txHashData, signatures);\\n }\\n address guard = getGuard();\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkTransaction(\\n // Transaction info\\n to,\\n value,\\n data,\\n operation,\\n safeTxGas,\\n // Payment info\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n // Signature info\\n signatures,\\n msg.sender\\n );\\n }\\n }\\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \\\"GS010\\\");\\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\\n {\\n uint256 gasUsed = gasleft();\\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\\n gasUsed = gasUsed.sub(gasleft());\\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\\n require(success || safeTxGas != 0 || gasPrice != 0, \\\"GS013\\\");\\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\\n uint256 payment = 0;\\n if (gasPrice > 0) {\\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\\n }\\n if (success) emit ExecutionSuccess(txHash, payment);\\n else emit ExecutionFailure(txHash, payment);\\n }\\n {\\n if (guard != address(0)) {\\n Guard(guard).checkAfterExecution(txHash, success);\\n }\\n }\\n }\\n\\n function handlePayment(\\n uint256 gasUsed,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver\\n ) private returns (uint256 payment) {\\n // solhint-disable-next-line avoid-tx-origin\\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\\n if (gasToken == address(0)) {\\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\\n require(receiver.send(payment), \\\"GS011\\\");\\n } else {\\n payment = gasUsed.add(baseGas).mul(gasPrice);\\n require(transferToken(gasToken, receiver, payment), \\\"GS012\\\");\\n }\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n */\\n function checkSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures\\n ) public view {\\n // Load threshold to avoid multiple storage loads\\n uint256 _threshold = threshold;\\n // Check that a threshold is set\\n require(_threshold > 0, \\\"GS001\\\");\\n checkNSignatures(dataHash, data, signatures, _threshold);\\n }\\n\\n /**\\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\\n * @param data That should be signed (this is passed to an external validator contract)\\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\\n * @param requiredSignatures Amount of required valid signatures.\\n */\\n function checkNSignatures(\\n bytes32 dataHash,\\n bytes memory data,\\n bytes memory signatures,\\n uint256 requiredSignatures\\n ) public view {\\n // Check that the provided signature data is not too short\\n require(signatures.length >= requiredSignatures.mul(65), \\\"GS020\\\");\\n // There cannot be an owner with address 0.\\n address lastOwner = address(0);\\n address currentOwner;\\n uint8 v;\\n bytes32 r;\\n bytes32 s;\\n uint256 i;\\n for (i = 0; i < requiredSignatures; i++) {\\n (v, r, s) = signatureSplit(signatures, i);\\n if (v == 0) {\\n // If v is 0 then it is a contract signature\\n // When handling contract signatures the address of the contract is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n\\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\\n // Here we only check that the pointer is not pointing inside the part that is being processed\\n require(uint256(s) >= requiredSignatures.mul(65), \\\"GS021\\\");\\n\\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\\n require(uint256(s).add(32) <= signatures.length, \\\"GS022\\\");\\n\\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\\n uint256 contractSignatureLen;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\\n }\\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \\\"GS023\\\");\\n\\n // Check signature\\n bytes memory contractSignature;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\\n contractSignature := add(add(signatures, s), 0x20)\\n }\\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \\\"GS024\\\");\\n } else if (v == 1) {\\n // If v is 1 then it is an approved hash\\n // When handling approved hashes the address of the approver is encoded into r\\n currentOwner = address(uint160(uint256(r)));\\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \\\"GS025\\\");\\n } else if (v > 30) {\\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\\n currentOwner = ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", dataHash)), v - 4, r, s);\\n } else {\\n // Default is the ecrecover flow with the provided data hash\\n // Use ecrecover with the messageHash for EOA signatures\\n currentOwner = ecrecover(dataHash, v, r, s);\\n }\\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \\\"GS026\\\");\\n lastOwner = currentOwner;\\n }\\n }\\n\\n /// @dev Allows to estimate a Safe transaction.\\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\\n /// @param to Destination address of Safe transaction.\\n /// @param value Ether value of Safe transaction.\\n /// @param data Data payload of Safe transaction.\\n /// @param operation Operation type of Safe transaction.\\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\\n function requiredTxGas(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation\\n ) external returns (uint256) {\\n uint256 startGas = gasleft();\\n // We don't provide an error message here, as we use it to return the estimate\\n require(execute(to, value, data, operation, gasleft()));\\n uint256 requiredGas = startGas - gasleft();\\n // Convert response to string and return via error message\\n revert(string(abi.encodePacked(requiredGas)));\\n }\\n\\n /**\\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\\n */\\n function approveHash(bytes32 hashToApprove) external {\\n require(owners[msg.sender] != address(0), \\\"GS030\\\");\\n approvedHashes[msg.sender][hashToApprove] = 1;\\n emit ApproveHash(hashToApprove, msg.sender);\\n }\\n\\n /// @dev Returns the chain id used by this contract.\\n function getChainId() public view returns (uint256) {\\n uint256 id;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n id := chainid()\\n }\\n return id;\\n }\\n\\n function domainSeparator() public view returns (bytes32) {\\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\\n }\\n\\n /// @dev Returns the bytes that are hashed to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Gas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash bytes.\\n function encodeTransactionData(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes memory) {\\n bytes32 safeTxHash =\\n keccak256(\\n abi.encode(\\n SAFE_TX_TYPEHASH,\\n to,\\n value,\\n keccak256(data),\\n operation,\\n safeTxGas,\\n baseGas,\\n gasPrice,\\n gasToken,\\n refundReceiver,\\n _nonce\\n )\\n );\\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\\n }\\n\\n /// @dev Returns hash to be signed by owners.\\n /// @param to Destination address.\\n /// @param value Ether value.\\n /// @param data Data payload.\\n /// @param operation Operation type.\\n /// @param safeTxGas Fas that should be used for the safe transaction.\\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\\n /// @param gasPrice Maximum gas price that should be used for this transaction.\\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\\n /// @param _nonce Transaction nonce.\\n /// @return Transaction hash.\\n function getTransactionHash(\\n address to,\\n uint256 value,\\n bytes calldata data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address refundReceiver,\\n uint256 _nonce\\n ) public view returns (bytes32) {\\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\\n }\\n}\\n\",\"keccak256\":\"0x2ca9e3e053c969b9364f62c50c2c25b92525db7fd0bad3ae1fb0c20dd575367c\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\n\\n/// @title Executor - A contract that can execute transactions\\n/// @author Richard Meissner - \\ncontract Executor {\\n function execute(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 txGas\\n ) internal returns (bool success) {\\n if (operation == Enum.Operation.DelegateCall) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\\n }\\n } else {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4d3a900673473466bc27413fdbb11aae60b5580b792c49411f01544e0b24fe08\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract FallbackManager is SelfAuthorized {\\n event ChangedFallbackHandler(address handler);\\n\\n // keccak256(\\\"fallback_manager.handler.address\\\")\\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\\n\\n function internalSetFallbackHandler(address handler) internal {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, handler)\\n }\\n }\\n\\n /// @dev Allows to add a contract to handle fallback calls.\\n /// Only fallback calls without value and with data will be forwarded.\\n /// This can only be done via a Safe transaction.\\n /// @param handler contract to handle fallbacks calls.\\n function setFallbackHandler(address handler) public authorized {\\n internalSetFallbackHandler(handler);\\n emit ChangedFallbackHandler(handler);\\n }\\n\\n // solhint-disable-next-line payable-fallback,no-complex-fallback\\n fallback() external {\\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let handler := sload(slot)\\n if iszero(handler) {\\n return(0, 0)\\n }\\n calldatacopy(0, 0, calldatasize())\\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\\n // Then the address without padding is stored right after the calldata\\n mstore(calldatasize(), shl(96, caller()))\\n // Add 20 bytes for the address appended add the end\\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n if iszero(success) {\\n revert(0, returndatasize())\\n }\\n return(0, returndatasize())\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1be9f0f3e80a78134c2e3a026c6a14759785bd35d135e87a4a025aeb6742791f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\ninterface Guard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\\n/// @author Richard Meissner - \\ncontract GuardManager is SelfAuthorized {\\n event ChangedGuard(address guard);\\n // keccak256(\\\"guard_manager.guard.address\\\")\\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\\n\\n /// @dev Set a guard that checks transactions before execution\\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\\n function setGuard(address guard) external authorized {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(slot, guard)\\n }\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() internal view returns (address guard) {\\n bytes32 slot = GUARD_STORAGE_SLOT;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n guard := sload(slot)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x53a532a31f9632d5a73ad0df56f05bd2b66a2f781f571eb48d00367d370707f9\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/Enum.sol\\\";\\nimport \\\"../common/SelfAuthorized.sol\\\";\\nimport \\\"./Executor.sol\\\";\\n\\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract ModuleManager is SelfAuthorized, Executor {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n address internal constant SENTINEL_MODULES = address(0x1);\\n\\n mapping(address => address) internal modules;\\n\\n function setupModules(address to, bytes memory data) internal {\\n require(modules[SENTINEL_MODULES] == address(0), \\\"GS100\\\");\\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\\n if (to != address(0))\\n // Setup has to complete successfully or transaction fails.\\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \\\"GS000\\\");\\n }\\n\\n /// @dev Allows to add a module to the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Enables the module `module` for the Safe.\\n /// @param module Module to be whitelisted.\\n function enableModule(address module) public authorized {\\n // Module address cannot be null or sentinel.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n // Module cannot be added twice.\\n require(modules[module] == address(0), \\\"GS102\\\");\\n modules[module] = modules[SENTINEL_MODULES];\\n modules[SENTINEL_MODULES] = module;\\n emit EnabledModule(module);\\n }\\n\\n /// @dev Allows to remove a module from the whitelist.\\n /// This can only be done via a Safe transaction.\\n /// @notice Disables the module `module` for the Safe.\\n /// @param prevModule Module that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) public authorized {\\n // Validate module address and check that it corresponds to module index.\\n require(module != address(0) && module != SENTINEL_MODULES, \\\"GS101\\\");\\n require(modules[prevModule] == module, \\\"GS103\\\");\\n modules[prevModule] = modules[module];\\n modules[module] = address(0);\\n emit DisabledModule(module);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public virtual returns (bool success) {\\n // Only whitelisted modules are allowed.\\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \\\"GS104\\\");\\n // Execute transaction without further confirmations.\\n success = execute(to, value, data, operation, gasleft());\\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\\n else emit ExecutionFromModuleFailure(msg.sender);\\n }\\n\\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) public returns (bool success, bytes memory returnData) {\\n success = execTransactionFromModule(to, value, data, operation);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Load free memory location\\n let ptr := mload(0x40)\\n // We allocate memory for the return data by setting the free memory location to\\n // current free memory location + data size + 32 bytes for data size value\\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\\n // Store the size\\n mstore(ptr, returndatasize())\\n // Store the data\\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\\n // Point the return data to the correct memory location\\n returnData := ptr\\n }\\n }\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) public view returns (bool) {\\n return SENTINEL_MODULES != module && modules[module] != address(0);\\n }\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\\n // Init array with max page size\\n array = new address[](pageSize);\\n\\n // Populate return array\\n uint256 moduleCount = 0;\\n address currentModule = modules[start];\\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\\n array[moduleCount] = currentModule;\\n currentModule = modules[currentModule];\\n moduleCount++;\\n }\\n next = currentModule;\\n // Set correct size of returned array\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(array, moduleCount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5512760a0328309f82a71cbe2ac14e0942501b9d44d5fb417bd02174546672e5\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\nimport \\\"../common/SelfAuthorized.sol\\\";\\n\\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\\n/// @author Stefan George - \\n/// @author Richard Meissner - \\ncontract OwnerManager is SelfAuthorized {\\n event AddedOwner(address owner);\\n event RemovedOwner(address owner);\\n event ChangedThreshold(uint256 threshold);\\n\\n address internal constant SENTINEL_OWNERS = address(0x1);\\n\\n mapping(address => address) internal owners;\\n uint256 internal ownerCount;\\n uint256 internal threshold;\\n\\n /// @dev Setup function sets initial storage of contract.\\n /// @param _owners List of Safe owners.\\n /// @param _threshold Number of required confirmations for a Safe transaction.\\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\\n // Threshold can only be 0 at initialization.\\n // Check ensures that setup function can only be called once.\\n require(threshold == 0, \\\"GS200\\\");\\n // Validate that threshold is smaller than number of added owners.\\n require(_threshold <= _owners.length, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n // Initializing Safe owners.\\n address currentOwner = SENTINEL_OWNERS;\\n for (uint256 i = 0; i < _owners.length; i++) {\\n // Owner address cannot be null.\\n address owner = _owners[i];\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[currentOwner] = owner;\\n currentOwner = owner;\\n }\\n owners[currentOwner] = SENTINEL_OWNERS;\\n ownerCount = _owners.length;\\n threshold = _threshold;\\n }\\n\\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\\n /// @param owner New owner address.\\n /// @param _threshold New threshold.\\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[owner] == address(0), \\\"GS204\\\");\\n owners[owner] = owners[SENTINEL_OWNERS];\\n owners[SENTINEL_OWNERS] = owner;\\n ownerCount++;\\n emit AddedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\\n /// This can only be done via a Safe transaction.\\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\\n /// @param owner Owner address to be removed.\\n /// @param _threshold New threshold.\\n function removeOwner(\\n address prevOwner,\\n address owner,\\n uint256 _threshold\\n ) public authorized {\\n // Only allow to remove an owner, if threshold can still be reached.\\n require(ownerCount - 1 >= _threshold, \\\"GS201\\\");\\n // Validate owner address and check that it corresponds to owner index.\\n require(owner != address(0) && owner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == owner, \\\"GS205\\\");\\n owners[prevOwner] = owners[owner];\\n owners[owner] = address(0);\\n ownerCount--;\\n emit RemovedOwner(owner);\\n // Change threshold if threshold was changed.\\n if (threshold != _threshold) changeThreshold(_threshold);\\n }\\n\\n /// @dev Allows to swap/replace an owner from the Safe with another address.\\n /// This can only be done via a Safe transaction.\\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\\n /// @param oldOwner Owner address to be replaced.\\n /// @param newOwner New owner address.\\n function swapOwner(\\n address prevOwner,\\n address oldOwner,\\n address newOwner\\n ) public authorized {\\n // Owner address cannot be null, the sentinel or the Safe itself.\\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \\\"GS203\\\");\\n // No duplicate owners allowed.\\n require(owners[newOwner] == address(0), \\\"GS204\\\");\\n // Validate oldOwner address and check that it corresponds to owner index.\\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \\\"GS203\\\");\\n require(owners[prevOwner] == oldOwner, \\\"GS205\\\");\\n owners[newOwner] = owners[oldOwner];\\n owners[prevOwner] = newOwner;\\n owners[oldOwner] = address(0);\\n emit RemovedOwner(oldOwner);\\n emit AddedOwner(newOwner);\\n }\\n\\n /// @dev Allows to update the number of required confirmations by Safe owners.\\n /// This can only be done via a Safe transaction.\\n /// @notice Changes the threshold of the Safe to `_threshold`.\\n /// @param _threshold New threshold.\\n function changeThreshold(uint256 _threshold) public authorized {\\n // Validate that threshold is smaller than number of owners.\\n require(_threshold <= ownerCount, \\\"GS201\\\");\\n // There has to be at least one Safe owner.\\n require(_threshold >= 1, \\\"GS202\\\");\\n threshold = _threshold;\\n emit ChangedThreshold(threshold);\\n }\\n\\n function getThreshold() public view returns (uint256) {\\n return threshold;\\n }\\n\\n function isOwner(address owner) public view returns (bool) {\\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\\n }\\n\\n /// @dev Returns array of owners.\\n /// @return Array of Safe owners.\\n function getOwners() public view returns (address[] memory) {\\n address[] memory array = new address[](ownerCount);\\n\\n // populate return array\\n uint256 index = 0;\\n address currentOwner = owners[SENTINEL_OWNERS];\\n while (currentOwner != SENTINEL_OWNERS) {\\n array[index] = currentOwner;\\n currentOwner = owners[currentOwner];\\n index++;\\n }\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x01a3d64cc0967f42ae63802409f5404d18352516ea2a6335005003d919ffcf12\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Enum - Collection of enums\\n/// @author Richard Meissner - \\ncontract Enum {\\n enum Operation {Call, DelegateCall}\\n}\\n\",\"keccak256\":\"0x473e45b1a5cc47be494b0e123c9127f0c11c1e0992a321ae5a644c0bfdb2c14f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\\n/// @author Richard Meissner - \\ncontract EtherPaymentFallback {\\n event SafeReceived(address indexed sender, uint256 value);\\n\\n /// @dev Fallback function accepts Ether transactions.\\n receive() external payable {\\n emit SafeReceived(msg.sender, msg.value);\\n }\\n}\\n\",\"keccak256\":\"0x1a7928d29877da84a3d0df846d5cd933d48ee095c1bde0aa044e249b12e27a72\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SecuredTokenTransfer - Secure token transfer\\n/// @author Richard Meissner - \\ncontract SecuredTokenTransfer {\\n /// @dev Transfers a token and returns if it was a success\\n /// @param token Token that should be transferred\\n /// @param receiver Receiver to whom the token should be transferred\\n /// @param amount The amount of tokens that should be transferred\\n function transferToken(\\n address token,\\n address receiver,\\n uint256 amount\\n ) internal returns (bool transferred) {\\n // 0xa9059cbb - keccack(\\\"transfer(address,uint256)\\\")\\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // We write the return value to scratch space.\\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\\n switch returndatasize()\\n case 0 {\\n transferred := success\\n }\\n case 0x20 {\\n transferred := iszero(or(iszero(success), iszero(mload(0))))\\n }\\n default {\\n transferred := 0\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x178682d8477da42936c7e8e24d39094c4ac08ecd8623794b9535d77001b665f1\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SelfAuthorized - authorizes current contract to perform actions\\n/// @author Richard Meissner - \\ncontract SelfAuthorized {\\n function requireSelfCall() private view {\\n require(msg.sender == address(this), \\\"GS031\\\");\\n }\\n\\n modifier authorized() {\\n // This is a function call as it minimized the bytecode size\\n requireSelfCall();\\n _;\\n }\\n}\\n\",\"keccak256\":\"0x59d36efca578b75541a776f62a0d0ef03712fc27b6647c3915c14b572106d7bc\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\\n/// @author Richard Meissner - \\ncontract SignatureDecoder {\\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\\n /// @param signatures concatenated rsv signatures\\n function signatureSplit(bytes memory signatures, uint256 pos)\\n internal\\n pure\\n returns (\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n )\\n {\\n // The signature format is a compact form of:\\n // {bytes32 r}{bytes32 s}{uint8 v}\\n // Compact means, uint8 is not padded to 32 bytes.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let signaturePos := mul(0x41, pos)\\n r := mload(add(signatures, add(signaturePos, 0x20)))\\n s := mload(add(signatures, add(signaturePos, 0x40)))\\n // Here we are loading the last 32 bytes, including 31 bytes\\n // of 's'. There is no 'mload8' to do this.\\n //\\n // 'byte' is not working due to the Solidity parser, so lets\\n // use the second best option, 'and'\\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2d37be182472ccfee62a33e9939f9b3d509be4c32e9fdebc2c1746c573655987\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/Singleton.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\\n/// @author Richard Meissner - \\ncontract Singleton {\\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\\n // It should also always be ensured that the address is stored alone (uses a full word)\\n address private singleton;\\n}\\n\",\"keccak256\":\"0x6e02c18998de8834dd7d69890cb6ede996b6f635d2337081a596d91e35e2c648\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\\ncontract StorageAccessible {\\n /**\\n * @dev Reads `length` bytes of storage in the currents contract\\n * @param offset - the offset in the current contract's storage in words to start reading from\\n * @param length - the number of words (32 bytes) of data to read\\n * @return the bytes that were read.\\n */\\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\\n bytes memory result = new bytes(length * 32);\\n for (uint256 index = 0; index < length; index++) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let word := sload(add(offset, index))\\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Performs a delegetecall on a targetContract in the context of self.\\n * Internally reverts execution to avoid side effects (making it static).\\n *\\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\\n * Specifically, the `returndata` after a call to this method will be:\\n * `success:bool || response.length:uint256 || response:bytes`.\\n *\\n * @param targetContract Address of the contract containing the code to execute.\\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\\n */\\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\\n\\n mstore(0x00, success)\\n mstore(0x20, returndatasize())\\n returndatacopy(0x40, 0, returndatasize())\\n revert(0, add(returndatasize(), 0x40))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x36853adb266c2ab7d3c612aca799441a86bd15d9e1d24fc6c70d63f5c2df3aaf\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title GnosisSafeMath\\n * @dev Math operations with safety checks that revert on error\\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\\n * TODO: remove once open zeppelin update to solc 0.5.0\\n */\\nlibrary GnosisSafeMath {\\n /**\\n * @dev Multiplies two numbers, reverts on overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b <= a);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Adds two numbers, reverts on overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x2a2b4d74f5834a9437be0cd3254d7a676698fc78aa47941c2009470196998d98\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract ISignatureValidatorConstants {\\n // bytes4(keccak256(\\\"isValidSignature(bytes,bytes)\\\")\\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\\n}\\n\\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\\n /**\\n * @dev Should return whether the signature provided is valid for the provided data\\n * @param _data Arbitrary length data signed on the behalf of address(this)\\n * @param _signature Signature byte array associated with _data\\n *\\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\\n * MUST allow external calls\\n */\\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\\n}\\n\",\"keccak256\":\"0x5b6e9bf17f28738ce88e751f420b0559f5151ba7bec2ff3c7bb31e42673d6801\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/core/Module.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"../interfaces/IAvatar.sol\\\";\\nimport \\\"../factory/FactoryFriendly.sol\\\";\\nimport \\\"../guard/Guardable.sol\\\";\\n\\nabstract contract Module is FactoryFriendly, Guardable {\\n /// @dev Address that will ultimately execute function calls.\\n address public avatar;\\n /// @dev Address that this module will pass transactions to.\\n address public target;\\n\\n /// @dev Emitted each time the avatar is set.\\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\\n /// @dev Emitted each time the Target is set.\\n event TargetSet(address indexed previousTarget, address indexed newTarget);\\n\\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\\n /// @notice Can only be called by the current owner.\\n function setAvatar(address _avatar) public onlyOwner {\\n address previousAvatar = avatar;\\n avatar = _avatar;\\n emit AvatarSet(previousAvatar, _avatar);\\n }\\n\\n /// @dev Sets the target to a new target (`newTarget`).\\n /// @notice Can only be called by the current owner.\\n function setTarget(address _target) public onlyOwner {\\n address previousTarget = target;\\n target = _target;\\n emit TargetSet(previousTarget, _target);\\n }\\n\\n /// @dev Passes a transaction to be executed by the avatar.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success) {\\n (success, ) = _exec(to, value, data, operation);\\n }\\n\\n /// @dev Passes a transaction to be executed by the target and returns data.\\n /// @notice Can only be called by this contract.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execAndReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) internal returns (bool success, bytes memory returnData) {\\n (success, returnData) = _exec(to, value, data, operation);\\n }\\n\\n function _exec(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) private returns (bool success, bytes memory returnData) {\\n address currentGuard = guard;\\n if (currentGuard != address(0)) {\\n IGuard(currentGuard).checkTransaction(\\n /// Transaction info used by module transactions.\\n to,\\n value,\\n data,\\n operation,\\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\\n 0,\\n 0,\\n 0,\\n address(0),\\n payable(0),\\n \\\"\\\",\\n msg.sender\\n );\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n IGuard(currentGuard).checkAfterExecution(\\\"\\\", success);\\n } else {\\n (success, returnData) = IAvatar(target)\\n .execTransactionFromModuleReturnData(\\n to,\\n value,\\n data,\\n operation\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x13da818c34bb4be89081b6155ab9787080a61b7123dc086cfd29f9ea8f50f880\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nabstract contract FactoryFriendly is OwnableUpgradeable {\\n function setUp(bytes memory initializeParams) public virtual;\\n}\\n\",\"keccak256\":\"0x96e61585b7340a901a54eb4c157ce28b630bff3d9d4597dfaac692128ea458c4\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../interfaces/IGuard.sol\\\";\\n\\nabstract contract BaseGuard is IERC165 {\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\\n }\\n\\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external virtual;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\\n}\\n\",\"keccak256\":\"0xa825848d06a1fc3cb7ad86727c669c8fc6b3bd8dbe419a617830ddcd5e245e47\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/guard/Guardable.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./BaseGuard.sol\\\";\\n\\n/// @title Guardable - A contract that manages fallback calls made to this contract\\ncontract Guardable is OwnableUpgradeable {\\n address public guard;\\n\\n event ChangedGuard(address guard);\\n\\n /// `guard_` does not implement IERC165.\\n error NotIERC165Compliant(address guard_);\\n\\n /// @dev Set a guard that checks transactions before execution.\\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\\n function setGuard(address _guard) external onlyOwner {\\n if (_guard != address(0)) {\\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\\n revert NotIERC165Compliant(_guard);\\n }\\n guard = _guard;\\n emit ChangedGuard(guard);\\n }\\n\\n function getGuard() external view returns (address _guard) {\\n return guard;\\n }\\n}\\n\",\"keccak256\":\"0xebdcfbe7f0822d8afcc21a1ca8d809417b438cc8b27c3547190a1627a9f5110f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\n\\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IAvatar {\\n event EnabledModule(address module);\\n event DisabledModule(address module);\\n event ExecutionFromModuleSuccess(address indexed module);\\n event ExecutionFromModuleFailure(address indexed module);\\n\\n /// @dev Enables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Modules should be stored as a linked list.\\n /// @notice Must emit EnabledModule(address module) if successful.\\n /// @param module Module to be enabled.\\n function enableModule(address module) external;\\n\\n /// @dev Disables a module on the avatar.\\n /// @notice Can only be called by the avatar.\\n /// @notice Must emit DisabledModule(address module) if successful.\\n /// @param prevModule Address that pointed to the module to be removed in the linked list\\n /// @param module Module to be removed.\\n function disableModule(address prevModule, address module) external;\\n\\n /// @dev Allows a Module to execute a transaction.\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModule(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success);\\n\\n /// @dev Allows a Module to execute a transaction and return data\\n /// @notice Can only be called by an enabled module.\\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\\n /// @param to Destination address of module transaction.\\n /// @param value Ether value of module transaction.\\n /// @param data Data payload of module transaction.\\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\\n function execTransactionFromModuleReturnData(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation\\n ) external returns (bool success, bytes memory returnData);\\n\\n /// @dev Returns if an module is enabled\\n /// @return True if the module is enabled\\n function isModuleEnabled(address module) external view returns (bool);\\n\\n /// @dev Returns array of modules.\\n /// @param start Start of the page.\\n /// @param pageSize Maximum number of modules that should be returned.\\n /// @return array Array of modules.\\n /// @return next Start of the next page.\\n function getModulesPaginated(address start, uint256 pageSize)\\n external\\n view\\n returns (address[] memory array, address next);\\n}\\n\",\"keccak256\":\"0xcd5508ffe596eef8fbccfd5fc4f10a34397773547ce64e212d48b5212865ec1f\",\"license\":\"LGPL-3.0-only\"},\"@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol\":{\"content\":\"// SPDX-License-Identifier: LGPL-3.0-only\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\n\\ninterface IGuard {\\n function checkTransaction(\\n address to,\\n uint256 value,\\n bytes memory data,\\n Enum.Operation operation,\\n uint256 safeTxGas,\\n uint256 baseGas,\\n uint256 gasPrice,\\n address gasToken,\\n address payable refundReceiver,\\n bytes memory signatures,\\n address msgSender\\n ) external;\\n\\n function checkAfterExecution(bytes32 txHash, bool success) external;\\n}\\n\",\"keccak256\":\"0xd0d855accbc5fba81c67ab22cdbb03325a8a4d7f6b7e981d1ff0fec3178e464d\",\"license\":\"LGPL-3.0-only\"},\"@opengsn/contracts/src/BaseRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable no-inline-assembly\\npragma solidity >=0.6.9;\\n\\nimport \\\"./interfaces/IRelayRecipient.sol\\\";\\n\\n/**\\n * A base contract to be inherited by any contract that want to receive relayed transactions\\n * A subclass must use \\\"_msgSender()\\\" instead of \\\"msg.sender\\\"\\n */\\nabstract contract BaseRelayRecipient is IRelayRecipient {\\n\\n /*\\n * Forwarder singleton we accept calls from\\n */\\n address private _trustedForwarder;\\n\\n function trustedForwarder() public virtual view returns (address){\\n return _trustedForwarder;\\n }\\n\\n function _setTrustedForwarder(address _forwarder) internal {\\n _trustedForwarder = _forwarder;\\n }\\n\\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, return the original sender.\\n * otherwise, return `msg.sender`.\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal override virtual view returns (address ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n // At this point we know that the sender is a trusted forwarder,\\n // so we trust that the last bytes of msg.data are the verified sender address.\\n // extract sender address from the end of msg.data\\n assembly {\\n ret := shr(96,calldataload(sub(calldatasize(),20)))\\n }\\n } else {\\n ret = msg.sender;\\n }\\n }\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal override virtual view returns (bytes calldata ret) {\\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\\n return msg.data[0:msg.data.length-20];\\n } else {\\n return msg.data;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xce3168b37fc87ec34a18b56b4b16a06432119c07fd2e1d864b871dcf40372ebe\",\"license\":\"MIT\"},\"@opengsn/contracts/src/interfaces/IRelayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.6.0;\\n\\n/**\\n * a contract must implement this interface in order to support relayed transaction.\\n * It is better to inherit the BaseRelayRecipient as its implementation.\\n */\\nabstract contract IRelayRecipient {\\n\\n /**\\n * return if the forwarder is trusted to forward relayed transactions to us.\\n * the forwarder is required to verify the sender's signature, and verify\\n * the call is not a replay.\\n */\\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\\n\\n /**\\n * return the sender of this call.\\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\\n * of the msg.data.\\n * otherwise, return `msg.sender`\\n * should be used in the contract anywhere instead of msg.sender\\n */\\n function _msgSender() internal virtual view returns (address);\\n\\n /**\\n * return the msg.data of this call.\\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\\n * of the msg.data - so this method will strip those 20 bytes off.\\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\\n * should be used in the contract instead of msg.data, where this difference matters.\\n */\\n function _msgData() internal virtual view returns (bytes calldata);\\n\\n function versionRecipient() external virtual view returns (string memory);\\n}\\n\",\"keccak256\":\"0x199e82e0a2833a97213b5c16ac9b4e2b1814f2e90a4c4916855cbc21e710ad5f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xe798cadb41e2da274913e4b3183a80f50fb057a42238fe8467e077268100ec27\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2b3005a0064cfc558bdf64b2bae94b565f4574a536aadd61c13838d4f2157790\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = MathUpgradeable.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, MathUpgradeable.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3017aded62c4a2b9707f5f06f92934e592c1c9b6f384b91b51340a6d5f841931\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/Baal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n/*\\n\\u2588\\u2588\\u2588 \\u2588\\u2588 \\u2588\\u2588 \\u2588\\n\\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\n\\u2588 \\u2580 \\u2584 \\u2588\\u2584\\u2584\\u2588 \\u2588\\u2584\\u2584\\u2588 \\u2588\\n\\u2588 \\u2584\\u2580 \\u2588 \\u2588 \\u2588 \\u2588 \\u2588\\u2588\\u2588\\u2584\\n\\u2588\\u2588\\u2588 \\u2588 \\u2588 \\u2580\\n \\u2588 \\u2588\\n \\u2580 \\u2580*/\\npragma solidity ^0.8.7;\\n\\nimport \\\"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\\\";\\nimport \\\"@gnosis.pm/zodiac/contracts/core/Module.sol\\\";\\nimport \\\"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\\\";\\nimport \\\"@opengsn/contracts/src/BaseRelayRecipient.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\n\\nimport \\\"./interfaces/IBaalToken.sol\\\";\\n\\n/// @title Baal ';_;'.\\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\\n using ECDSAUpgradeable for bytes32;\\n\\n // ERC20 SHARES + LOOT\\n\\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\\n\\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\\n\\n // GOVERNANCE PARAMS\\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\\n uint256 public proposalOffering; /* non-member proposal offering*/\\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\\n\\n // SHAMAN PERMISSIONS\\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\\n /* permissions registry for shamans\\n 0 = no permission\\n 1 = admin only\\n 2 = manager only\\n 4 = governance only\\n 3 = admin + manager\\n 5 = admin + governance\\n 6 = manager + governance\\n 7 = admin + manager + governance */\\n\\n // PROPOSAL TRACKING\\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\\n\\n // MISCELLANEOUS PARAMS\\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\\n address public multisendLibrary; /*address of multisend library*/\\n string public override versionRecipient; /* version recipient for OpenGSN */\\n\\n // SIGNATURE HELPERS\\n bytes32 constant VOTE_TYPEHASH = keccak256(\\\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\\\");\\n\\n // DATA STRUCTURES\\n struct Proposal {\\n /*Baal proposal details*/\\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\\n uint256 baalGas; /* gas needed to process proposal */\\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\\n }\\n\\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n \\\\-> Cancelled \\\\-> Defeated */\\n enum ProposalState {\\n Unborn, /* 0 - can submit */\\n Submitted, /* 1 - can sponsor -> voting */\\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\\n Cancelled, /* 3 - terminal state, counts as processed */\\n Grace, /* 4 - proceeds to ready/defeated */\\n Ready, /* 5 - can be processed */\\n Processed, /* 6 - terminal state */\\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\\n }\\n\\n // MODIFIERS\\n\\n modifier baalOnly() {\\n require(_msgSender() == avatar, \\\"!baal\\\");\\n _;\\n }\\n\\n modifier baalOrAdminOnly() {\\n require(_msgSender() == avatar || isAdmin(_msgSender()), \\\"!baal & !admin\\\"); /*check `shaman` is admin*/\\n _;\\n }\\n\\n modifier baalOrManagerOnly() {\\n require(\\n _msgSender() == avatar || isManager(_msgSender()),\\n \\\"!baal & !manager\\\"\\n ); /*check `shaman` is manager*/\\n _;\\n }\\n\\n modifier baalOrGovernorOnly() {\\n require(\\n _msgSender() == avatar || isGovernor(_msgSender()),\\n \\\"!baal & !governor\\\"\\n ); /*check `shaman` is governor*/\\n _;\\n }\\n\\n // EVENTS\\n event SetupComplete(\\n bool lootPaused,\\n bool sharesPaused,\\n uint32 gracePeriod,\\n uint32 votingPeriod,\\n uint256 proposalOffering,\\n uint256 quorumPercent,\\n uint256 sponsorThreshold,\\n uint256 minRetentionPercent,\\n string name,\\n string symbol,\\n uint256 totalShares,\\n uint256 totalLoot\\n ); /*emits after Baal summoning*/\\n event SubmitProposal(\\n uint256 indexed proposal,\\n bytes32 indexed proposalDataHash,\\n uint256 votingPeriod,\\n bytes proposalData,\\n uint256 expiration,\\n uint256 baalGas,\\n bool selfSponsor,\\n uint256 timestamp,\\n string details\\n ); /*emits after proposal is submitted*/\\n event SponsorProposal(\\n address indexed member,\\n uint256 indexed proposal,\\n uint256 indexed votingStarts\\n ); /*emits after member has sponsored proposal*/\\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\\n event SubmitVote(\\n address indexed member,\\n uint256 balance,\\n uint256 indexed proposal,\\n bool indexed approved\\n ); /*emits after vote is submitted on proposal*/\\n event ProcessProposal(\\n uint256 indexed proposal,\\n bool passed,\\n bool actionFailed\\n ); /*emits when proposal is processed & executed*/\\n event Ragequit(\\n address indexed member,\\n address to,\\n uint256 indexed lootToBurn,\\n uint256 indexed sharesToBurn,\\n address[] tokens\\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 amount\\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\\n\\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\\n event GovernanceConfigSet(\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ); /*emits when gov config changes*/\\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\\n event LockManager(bool managerLock); /*emits when admin is locked*/\\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\\n\\n function encodeMultisend(bytes[] memory _calls, address _target)\\n external\\n pure\\n returns (bytes memory encodedMultisend)\\n {\\n bytes memory encodedActions;\\n for (uint256 i = 0; i < _calls.length; i++) {\\n encodedActions = abi.encodePacked(\\n encodedActions,\\n uint8(0),\\n _target,\\n uint256(0),\\n uint256(_calls[i].length),\\n bytes(_calls[i])\\n );\\n }\\n encodedMultisend = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n encodedActions\\n );\\n }\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\\n /// @param _initializationParams Encoded setup information.\\n function setUp(bytes memory _initializationParams)\\n public\\n override(FactoryFriendly)\\n initializer\\n nonReentrant\\n {\\n (\\n address _lootToken, /*loot ERC20 token*/\\n address _sharesToken, /*shares ERC20 token*/\\n address _multisendLibrary, /*address of multisend library*/\\n address _avatar, /*Safe contract address*/\\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\\n ) = abi.decode(\\n _initializationParams,\\n (address, address, address, address, address, bytes)\\n );\\n\\n require(\\n _multisendLibrary != address(0) &&\\n _avatar != address(0),\\n \\\"0 addr used\\\"\\n );\\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\\n\\n versionRecipient = \\\"2.2.5+opengsn.payablewithbaal.irelayrecipient\\\";\\n __Ownable_init();\\n __ReentrancyGuard_init();\\n __EIP712_init(\\\"Vote\\\", \\\"4\\\");\\n transferOwnership(_avatar);\\n\\n // Set the Gnosis safe address\\n avatar = _avatar;\\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\\n\\n // Set trusted forwarder\\n _setTrustedForwarder(_forwarder);\\n\\n lootToken = IBaalToken(_lootToken);\\n sharesToken = IBaalToken(_sharesToken);\\n\\n /*Set address of Gnosis multisend library to use for all execution*/\\n multisendLibrary = _multisendLibrary;\\n\\n // Execute all setups including but not limited to\\n // * mint shares\\n // * convert shares to loot\\n // * set shamans\\n // * set admin configurations\\n require(\\n exec(\\n multisendLibrary,\\n 0,\\n _initializationMultisendData,\\n Enum.Operation.DelegateCall\\n ),\\n \\\"call failure setup\\\"\\n );\\n\\n emit SetupComplete(\\n lootToken.paused(),\\n sharesToken.paused(),\\n gracePeriod,\\n votingPeriod,\\n proposalOffering,\\n quorumPercent,\\n sponsorThreshold,\\n minRetentionPercent,\\n sharesToken.name(),\\n sharesToken.symbol(),\\n totalShares(),\\n totalLoot()\\n );\\n\\n }\\n\\n /*****************\\n PROPOSAL FUNCTIONS\\n *****************/\\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\\n /// @param proposalData Multisend encoded transactions or proposal data\\n /// @param details Context for proposal.\\n /// @return proposal Count for submitted proposal.\\n function submitProposal(\\n bytes calldata proposalData,\\n uint32 expiration,\\n uint256 baalGas,\\n string calldata details\\n ) external payable nonReentrant returns (uint256) {\\n require(\\n expiration == 0 ||\\n expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n require(baalGas <= 20000000, \\\"baalGas to high\\\"); /* gwei 2/3 eth block limit */\\n\\n bool selfSponsor = false; /*plant sponsor flag*/\\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\\n } else {\\n require(msg.value == proposalOffering, \\\"Baal requires an offering\\\"); /*Optional anti-spam gas token tribute*/\\n (bool _success, ) = target.call{value: msg.value}(\\\"\\\"); /*Send ETH to sink*/\\n require(_success, \\\"could not send\\\");\\n }\\n\\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\\n\\n proposalCount++; /*increment proposal counter*/\\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\\n proposalCount,\\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\\n selfSponsor\\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\\n : 0, /* graceEnds */\\n expiration,\\n baalGas,\\n 0, /* yes votes */\\n 0, /* no votes */\\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\\n selfSponsor ? _msgSender() : address(0),\\n proposalDataHash\\n );\\n\\n if (selfSponsor) {\\n latestSponsoredProposalId = proposalCount;\\n }\\n\\n emit SubmitProposal(\\n proposalCount,\\n proposalDataHash,\\n votingPeriod,\\n proposalData,\\n expiration,\\n baalGas,\\n selfSponsor,\\n block.timestamp,\\n details\\n ); /*emit event reflecting proposal submission*/\\n\\n return proposalCount;\\n }\\n\\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\\n /// @param id Number of proposal in `proposals` mapping to sponsor.\\n function sponsorProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n\\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \\\"!sponsor\\\"); /*check 'votes > threshold - required to sponsor proposal*/\\n require(state(id) == ProposalState.Submitted, \\\"!submitted\\\");\\n require(\\n prop.expiration == 0 ||\\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\\n \\\"expired\\\"\\n );\\n\\n prop.votingStarts = uint32(block.timestamp);\\n\\n unchecked {\\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\\n prop.graceEnds =\\n uint32(block.timestamp) +\\n votingPeriod +\\n gracePeriod;\\n }\\n\\n prop.prevProposalId = latestSponsoredProposalId;\\n prop.sponsor = _msgSender();\\n // snapshot both total supply and total shares\\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\\n latestSponsoredProposalId = id;\\n\\n emit SponsorProposal(_msgSender(), id, block.timestamp);\\n }\\n\\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function submitVote(uint32 id, bool approved) external nonReentrant {\\n _submitVote(_msgSender(), id, approved);\\n }\\n\\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\\n /// @param voter Address of member who submitted vote.\\n /// @param expiry Expiration of signature.\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n /// @param v v in signature\\n /// @param r r in signature\\n /// @param s s in signature\\n function submitVoteWithSig(\\n address voter,\\n uint256 expiry,\\n uint256 nonce,\\n uint32 id,\\n bool approved,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external nonReentrant {\\n require(block.timestamp <= expiry, \\\"ERC20Votes: signature expired\\\");\\n require(nonce == votingNonces[voter], \\\"!nonce\\\");\\n\\n /*calculate EIP-712 struct hash*/\\n bytes32 structHash = keccak256(\\n abi.encode(\\n VOTE_TYPEHASH,\\n keccak256(abi.encodePacked(sharesToken.name())),\\n voter,\\n expiry,\\n nonce,\\n id,\\n approved\\n )\\n );\\n bytes32 hash = _hashTypedDataV4(structHash);\\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\\n\\n require(signer == voter, \\\"invalid signature\\\");\\n require(signer != address(0), \\\"!signer\\\");\\n votingNonces[voter] += 1;\\n\\n _submitVote(signer, id, approved);\\n }\\n\\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\\n /// @param voter Address of voter\\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\\n function _submitVote(\\n address voter,\\n uint32 id,\\n bool approved\\n ) internal {\\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n\\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\\n\\n require(balance > 0, \\\"!member\\\"); /* check that user has shares*/\\n require(!memberVoted[voter][id], \\\"voted\\\"); /*check vote not already cast*/\\n\\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\\n\\n // get high water mark on all votes\\n uint256 _totalSupply = totalSupply();\\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\\n }\\n\\n unchecked {\\n if (approved) {\\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\\n prop.yesVotes += balance; \\n } else {\\n /*otherwise, cast delegated balance `noVotes` to proposal*/\\n prop.noVotes += balance;\\n }\\n }\\n\\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\\n }\\n\\n /// @notice Process `proposal` & execute internal functions.\\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n function processProposal(uint32 id, bytes calldata proposalData)\\n external\\n nonReentrant\\n {\\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\\n\\n require(prop.sponsor != address(0), \\\"!sponsor\\\"); /*check proposal has been sponsored*/\\n require(state(id) == ProposalState.Ready, \\\"!ready\\\"); /* check proposal is Ready to process */\\n\\n ProposalState prevProposalState = state(prop.prevProposalId);\\n require(\\n prevProposalState == ProposalState.Processed ||\\n prevProposalState == ProposalState.Cancelled ||\\n prevProposalState == ProposalState.Defeated ||\\n prevProposalState == ProposalState.Unborn,\\n \\\"prev!processed\\\"\\n );\\n\\n // check that the proposalData matches the stored hash\\n require(\\n hashOperation(proposalData) == prop.proposalDataHash,\\n \\\"incorrect calldata\\\"\\n );\\n\\n require(\\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\\n \\\"not enough gas\\\"\\n );\\n\\n prop.status[1] = true; /*Set processed flag to true*/\\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\\n\\n // Make proposal fail if after expiration\\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\\n okToExecute = false;\\n\\n // Make proposal fail if it didn't pass quorum\\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\\n okToExecute = false;\\n\\n // Make proposal fail if the minRetentionPercent is exceeded\\n if (\\n okToExecute &&\\n (totalSupply()) <\\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\\n ) {\\n okToExecute = false;\\n }\\n\\n /*check if `proposal` approved by simple majority of members*/\\n if (okToExecute) {\\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\\n bool success = processActionProposal(proposalData); /*execute 'action'*/\\n if (!success) {\\n prop.status[3] = true;\\n }\\n }\\n\\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\\n }\\n\\n /// @notice Internal function to process 'action'[0] proposal.\\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\\n /// @return success Success or failure of execution\\n function processActionProposal(bytes memory proposalData)\\n private\\n returns (bool success)\\n {\\n success = exec(\\n multisendLibrary,\\n 0,\\n proposalData,\\n Enum.Operation.DelegateCall\\n );\\n }\\n\\n /// @notice Cancel proposal prior to execution\\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\\n /// @param id Number of proposal in `proposals` mapping to process for execution.\\n function cancelProposal(uint32 id) external nonReentrant {\\n Proposal storage prop = proposals[id];\\n require(state(id) == ProposalState.Voting, \\\"!voting\\\");\\n require(\\n _msgSender() == prop.sponsor ||\\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\\n sponsorThreshold ||\\n isGovernor(_msgSender()),\\n \\\"!cancellable\\\"\\n );\\n prop.status[0] = true;\\n emit CancelProposal(id);\\n }\\n\\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\\n /// proposal or by a delegated signer on the Safe\\n /// @param _to address to call\\n /// @param _value value to include in wei\\n /// @param _data arbitrary transaction data\\n function executeAsBaal(\\n address _to,\\n uint256 _value,\\n bytes calldata _data\\n ) external baalOnly {\\n (bool success, ) = _to.call{value: _value}(_data);\\n require(success, \\\"call failure execute\\\");\\n }\\n\\n // ****************\\n // MEMBER FUNCTIONS\\n // ****************\\n\\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] calldata tokens\\n ) external nonReentrant {\\n for (uint256 i = 1; i < tokens.length; i++) {\\n require(tokens[i] > tokens[i - 1], \\\"!order\\\");\\n }\\n\\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\\n }\\n\\n /// @notice Internal execution of rage quite\\n /// @param to Account that receives 'fair share'.\\n /// @param lootToBurn Baal pure economic weight to burn.\\n /// @param sharesToBurn Baal voting weight to burn.\\n /// @param tokens Array of tokens to include in rage quit calculation\\n function _ragequit(\\n address to,\\n uint256 sharesToBurn,\\n uint256 lootToBurn,\\n address[] memory tokens\\n ) internal {\\n uint256 _totalSupply = totalSupply();\\n\\n if (lootToBurn != 0) {\\n /*gas optimization*/\\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\\n }\\n\\n if (sharesToBurn != 0) {\\n /*gas optimization*/\\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\\n }\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n uint256 balance;\\n if(tokens[i] == ETH) {\\n balance = address(target).balance;\\n } else {\\n (, bytes memory balanceData) = tokens[i].staticcall(\\n abi.encodeWithSelector(0x70a08231, address(target))\\n ); /*get Baal token balances - 'balanceOf(address)'*/\\n balance = abi.decode(balanceData, (uint256));\\n }\\n\\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\\n _totalSupply; /*calculate 'fair shair' claims*/\\n\\n if (amountToRagequit != 0) {\\n /*gas optimization to allow higher maximum token limit*/\\n tokens[i] == ETH\\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\\n }\\n }\\n\\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\\n }\\n\\n /*******************\\n GUILD MGMT FUNCTIONS\\n *******************/\\n /// @notice Baal-only function to set shaman status.\\n /// @param _shamans Addresses of shaman contracts\\n /// @param _permissions Permission level of each shaman in _shamans\\n function setShamans(\\n address[] calldata _shamans,\\n uint256[] calldata _permissions\\n ) external baalOnly {\\n require(_shamans.length == _permissions.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < _shamans.length; i++) {\\n uint256 permission = _permissions[i];\\n if (adminLock)\\n require(\\n permission != 1 &&\\n permission != 3 &&\\n permission != 5 &&\\n permission != 7,\\n \\\"admin lock\\\"\\n );\\n if (managerLock)\\n require(\\n permission != 2 &&\\n permission != 3 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"manager lock\\\"\\n );\\n if (governorLock)\\n require(\\n permission != 4 &&\\n permission != 5 &&\\n permission != 6 &&\\n permission != 7,\\n \\\"governor lock\\\"\\n );\\n shamans[_shamans[i]] = permission;\\n emit ShamanSet(_shamans[i], permission);\\n }\\n }\\n\\n /// @notice Lock admin so setShamans cannot be called with admin changes\\n function lockAdmin() external baalOnly {\\n adminLock = true;\\n\\n emit LockAdmin(adminLock);\\n }\\n\\n /// @notice Lock manager so setShamans cannot be called with manager changes\\n function lockManager() external baalOnly {\\n managerLock = true;\\n\\n emit LockManager(managerLock);\\n }\\n\\n /// @notice Lock governor so setShamans cannot be called with governor changes\\n function lockGovernor() external baalOnly {\\n governorLock = true;\\n\\n emit LockGovernor(governorLock);\\n }\\n\\n // ****************\\n // SHAMAN FUNCTIONS\\n // ****************\\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\\n /// @param pauseShares Turn share transfers on or off\\n /// @param pauseLoot Turn loot transfers on or off\\n function setAdminConfig(bool pauseShares, bool pauseLoot)\\n external\\n baalOrAdminOnly\\n {\\n\\n if(pauseShares && !sharesToken.paused()){\\n sharesToken.pause();\\n emit SharesPaused(true);\\n } else if(!pauseShares && sharesToken.paused()){\\n sharesToken.unpause();\\n emit SharesPaused(false);\\n }\\n\\n if(pauseLoot && !lootToken.paused()){\\n lootToken.pause();\\n emit LootPaused(true);\\n } else if(!pauseLoot && lootToken.paused()){\\n lootToken.unpause();\\n emit LootPaused(false);\\n }\\n }\\n\\n /// @notice Baal-or-manager-only function to mint shares.\\n /// @param to Array of addresses to receive shares\\n /// @param amount Array of amounts to mint\\n function mintShares(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `shares`.\\n /// @param to Address to receive shares\\n /// @param shares Amount to mint\\n function _mintShares(address to, uint256 shares) private {\\n sharesToken.mint(to, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn shares.\\n /// @param from Array of addresses to lose shares\\n /// @param amount Array of amounts to burn\\n function burnShares(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `shares`.\\n /// @param from Address to lose shares\\n /// @param shares Amount to burn\\n function _burnShares(address from, uint256 shares) private {\\n sharesToken.burn(from, shares);\\n }\\n\\n /// @notice Baal-or-manager-only function to mint loot.\\n /// @param to Array of addresses to mint loot\\n /// @param amount Array of amounts to mint\\n function mintLoot(address[] calldata to, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(to.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < to.length; i++) {\\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Minting function for Baal `loot`.\\n /// @param to Address to mint loot\\n /// @param loot Amount to mint\\n function _mintLoot(address to, uint256 loot) private {\\n lootToken.mint(to, loot);\\n }\\n\\n /// @notice Baal-or-manager-only function to burn loot.\\n /// @param from Array of addresses to lose loot\\n /// @param amount Array of amounts to burn\\n function burnLoot(address[] calldata from, uint256[] calldata amount)\\n external\\n baalOrManagerOnly\\n {\\n require(from.length == amount.length, \\\"!array parity\\\"); /*check array lengths match*/\\n for (uint256 i = 0; i < from.length; i++) {\\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\\n }\\n }\\n\\n /// @notice Burn function for Baal `loot`.\\n /// @param from Address to lose loot\\n /// @param loot Amount to burn\\n function _burnLoot(address from, uint256 loot) private {\\n lootToken.burn(from, loot);\\n }\\n\\n /// @notice Baal-or-governance-only function to change periods.\\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\\n function setGovernanceConfig(bytes memory _governanceConfig)\\n external\\n baalOrGovernorOnly\\n {\\n (\\n uint32 voting,\\n uint32 grace,\\n uint256 newOffering,\\n uint256 quorum,\\n uint256 sponsor,\\n uint256 minRetention\\n ) = abi.decode(\\n _governanceConfig,\\n (uint32, uint32, uint256, uint256, uint256, uint256)\\n );\\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\\n\\n // on initialization of governance config, there is no shares token\\n // skip this check on initialization of governance config.\\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\\n }\\n\\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\\n proposalOffering = newOffering; /*set new proposal offering amount */\\n quorumPercent = quorum;\\n sponsorThreshold = sponsor;\\n minRetentionPercent = minRetention;\\n\\n emit GovernanceConfigSet(\\n voting,\\n grace,\\n newOffering,\\n quorum,\\n sponsor,\\n minRetention\\n );\\n }\\n\\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\\n /// @param _trustedForwarderAddress Trusted forwarder's address\\n function setTrustedForwarder(address _trustedForwarderAddress)\\n external\\n baalOrGovernorOnly\\n {\\n _setTrustedForwarder(_trustedForwarderAddress);\\n emit SetTrustedForwarder(_trustedForwarderAddress);\\n }\\n\\n /***************\\n GETTER FUNCTIONS\\n ***************/\\n /// @notice State helper to determine proposal state\\n /// @param id Number of proposal in proposals\\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\\n /// \\\\-> Cancelled \\\\-> Defeated\\n function state(uint32 id) public view returns (ProposalState) {\\n Proposal memory prop = proposals[id];\\n if (prop.id == 0) {\\n /*Uninitialized state*/\\n return ProposalState.Unborn;\\n } else if (\\n prop.status[0] /* cancelled */\\n ) {\\n return ProposalState.Cancelled;\\n } else if (\\n prop.votingStarts == 0 /*Voting has not started*/\\n ) {\\n return ProposalState.Submitted;\\n } else if (\\n block.timestamp <= prop.votingEnds /*Voting in progress*/\\n ) {\\n return ProposalState.Voting;\\n } else if (\\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\\n ) {\\n return ProposalState.Grace;\\n } else if (\\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\\n ) {\\n return ProposalState.Defeated;\\n } else if (\\n prop.status[1] /* processed */\\n ) {\\n return ProposalState.Processed;\\n }\\n /* Proposal is ready to be processed*/\\n else {\\n return ProposalState.Ready;\\n }\\n }\\n\\n /// @notice Helper to get recorded proposal flags\\n /// @param id Number of proposal in proposals\\n /// @return [cancelled, processed, passed, actionFailed]\\n function getProposalStatus(uint32 id)\\n external\\n view\\n returns (bool[4] memory)\\n {\\n return proposals[id].status;\\n }\\n\\n /// @notice Helper to check if shaman permission contains admin capabilities\\n /// @param shaman Address attempting to execute admin permissioned functions\\n function isAdmin(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 1 ||\\n permission == 3 ||\\n permission == 5 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains manager capabilities\\n /// @param shaman Address attempting to execute manager permissioned functions\\n function isManager(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 2 ||\\n permission == 3 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check if shaman permission contains governor capabilities\\n /// @param shaman Address attempting to execute governor permissioned functions\\n function isGovernor(address shaman) public view returns (bool) {\\n uint256 permission = shamans[shaman];\\n return (permission == 4 ||\\n permission == 5 ||\\n permission == 6 ||\\n permission == 7);\\n }\\n\\n /// @notice Helper to check total supply of child loot contract\\n function totalLoot() public view returns (uint256) {\\n return lootToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of child shares contract\\n function totalShares() public view returns (uint256) {\\n return sharesToken.totalSupply();\\n }\\n\\n /// @notice Helper to check total supply of loot and shares\\n function totalSupply() public view returns (uint256) {\\n return totalLoot() + totalShares();\\n }\\n\\n /***************\\n HELPER FUNCTIONS\\n ***************/\\n /// @notice Returns the keccak256 hash of calldata\\n function hashOperation(bytes memory _transactions)\\n public\\n pure\\n virtual\\n returns (bytes32 hash)\\n {\\n return keccak256(abi.encode(_transactions));\\n }\\n\\n /// @notice Provides 'safe' {transfer} for ETH.\\n function _safeTransferETH(address to, uint256 amount) internal {\\n // transfer eth from target\\n (bool success, ) = execAndReturnData(\\n to,\\n amount,\\n \\\"\\\",\\n Enum.Operation.Call\\n );\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n\\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\\n function _safeTransfer(\\n address token,\\n address to,\\n uint256 amount\\n ) private {\\n (bool success, bytes memory data) = execAndReturnData(\\n token,\\n 0,\\n abi.encodeWithSelector(0xa9059cbb, to, amount),\\n Enum.Operation.Call\\n ); /*'transfer(address,uint)'*/\\n require(\\n success && (data.length == 0 || abi.decode(data, (bool))),\\n \\\"transfer failed\\\"\\n ); /*checks success & allows non-conforming transfers*/\\n }\\n\\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (address sender) {\\n sender = BaseRelayRecipient._msgSender();\\n }\\n\\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\\n returns (bytes calldata) {\\n return BaseRelayRecipient._msgData();\\n }\\n}\\n\",\"keccak256\":\"0xa74529caeca9e73b0b5920900ede43f35a39a70a502c89bf324ca29ca80979bf\",\"license\":\"MIT\"},\"contracts/interfaces/IBaalToken.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface IBaalToken {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function setUp(string memory _name, string memory _symbol) external;\\n\\n function mint(address recipient, uint256 amount) external;\\n\\n function burn(address account, uint256 amount) external;\\n\\n function pause() external;\\n\\n function unpause() external;\\n\\n function paused() external view returns (bool);\\n \\n function transferOwnership(address newOwner) external;\\n\\n function owner() external view returns (address);\\n\\n function balanceOf(address account) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function snapshot() external returns(uint256);\\n\\n function getCurrentSnapshotId() external returns(uint256);\\n\\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\\n\\n // below is shares token specific\\n struct Checkpoint {\\n uint32 fromTimePoint;\\n uint256 votes;\\n }\\n\\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\\n\\n function numCheckpoints(address) external view returns (uint256);\\n\\n function getCheckpoint(address, uint256)\\n external\\n view\\n returns (Checkpoint memory);\\n\\n function getVotes(address account) external view returns (uint256);\\n\\n function delegates(address account) external view returns (address);\\n\\n function delegationNonces(address account) external view returns (uint256);\\n\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0x0817d09fef6022bf8b963060c7c576b5cc59cd4ac573da23b1ae7224cb272508\",\"license\":\"MIT\"},\"contracts/tools/TributeMinion.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.7;\\nimport \\\"../Baal.sol\\\";\\n\\ninterface IERC20 {\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) external returns (bool);\\n}\\n\\ncontract TributeMinion {\\n event TributeProposal(\\n address indexed baal,\\n address token,\\n uint256 amount,\\n address recipient,\\n uint256 proposalId\\n );\\n struct Escrow {\\n address token;\\n address applicant;\\n uint256 amount;\\n bool released;\\n address safe;\\n }\\n mapping(address => mapping(uint256 => Escrow)) public escrows;\\n\\n event EscrowReleased(\\n address indexed baal,\\n uint32 proposalId,\\n address applicant,\\n address safe,\\n uint256 amount\\n );\\n\\n function encodeTributeProposal(\\n address baal,\\n uint256 shares,\\n uint256 loot,\\n address recipient,\\n uint32 proposalId,\\n address escrow\\n ) public pure returns (bytes memory) {\\n // Workaround for solidity dynamic memory array\\n address[] memory _recipients = new address[](1);\\n _recipients[0] = recipient;\\n\\n bytes memory _releaseEscrow = abi.encodeWithSignature(\\n \\\"releaseEscrow(address,uint32)\\\",\\n baal,\\n proposalId\\n );\\n\\n bytes memory tributeMultisend = abi.encodePacked(\\n uint8(0),\\n escrow,\\n uint256(0),\\n uint256(_releaseEscrow.length),\\n bytes(_releaseEscrow)\\n );\\n\\n if (shares > 0) {\\n // Workaround for solidity dynamic memory array\\n uint256[] memory _shares = new uint256[](1);\\n _shares[0] = shares;\\n\\n bytes memory _issueShares = abi.encodeWithSignature(\\n \\\"mintShares(address[],uint256[])\\\",\\n _recipients,\\n _shares\\n );\\n\\n tributeMultisend = abi.encodePacked(\\n tributeMultisend,\\n uint8(0),\\n baal,\\n uint256(0),\\n uint256(_issueShares.length),\\n bytes(_issueShares)\\n );\\n }\\n if (loot > 0) {\\n // Workaround for solidity dynamic memory array\\n uint256[] memory _loot = new uint256[](1);\\n _loot[0] = loot;\\n\\n bytes memory _issueLoot = abi.encodeWithSignature(\\n \\\"mintLoot(address[],uint256[])\\\",\\n _recipients,\\n _loot\\n );\\n\\n tributeMultisend = abi.encodePacked(\\n tributeMultisend,\\n uint8(0),\\n address(baal),\\n uint256(0),\\n uint256(_issueLoot.length),\\n bytes(_issueLoot)\\n );\\n }\\n\\n bytes memory _multisendAction = abi.encodeWithSignature(\\n \\\"multiSend(bytes)\\\",\\n tributeMultisend\\n );\\n return _multisendAction;\\n }\\n\\n function submitTributeProposal(\\n Baal baal,\\n address token,\\n uint256 amount,\\n uint256 shares,\\n uint256 loot,\\n uint32 expiration,\\n uint256 baalgas,\\n string memory details\\n ) external payable {\\n uint32 proposalId = baal.proposalCount() + 1;\\n\\n bytes memory encodedProposal = encodeTributeProposal(\\n address(baal),\\n shares,\\n loot,\\n msg.sender,\\n proposalId,\\n address(this)\\n );\\n\\n escrows[address(baal)][proposalId] = Escrow(\\n token,\\n msg.sender,\\n amount,\\n false,\\n baal.target()\\n );\\n\\n baal.submitProposal{value:msg.value}(encodedProposal, expiration, baalgas, details);\\n\\n emit TributeProposal(\\n address(baal),\\n token,\\n amount,\\n msg.sender,\\n proposalId\\n );\\n }\\n\\n function releaseEscrow(address _baal, uint32 _proposalId) external {\\n Baal baal = Baal(_baal);\\n Escrow storage escrow = escrows[address(baal)][_proposalId];\\n require(!escrow.released, \\\"Already released\\\");\\n\\n bool[4] memory status = baal.getProposalStatus(_proposalId);\\n require(status[2], \\\"Not passed\\\");\\n escrow.released = true;\\n\\n IERC20 token = IERC20(escrow.token);\\n\\n emit EscrowReleased(\\n _baal,\\n _proposalId,\\n escrow.applicant,\\n escrow.safe,\\n escrow.amount\\n );\\n\\n require(\\n token.transferFrom(escrow.applicant, escrow.safe, escrow.amount),\\n \\\"Transfer failed\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x878896b7c3bdd2b2132d356d9d6f6cff263c88027970ea8c2c917d6fdef52209\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610f10806100206000396000f3fe60806040526004361061003f5760003560e01c806304a54aa7146100445780633336c279146100e0578063610ac73d146101025780636bd4afe714610115575b600080fd5b34801561005057600080fd5b506100a561005f366004610980565b600060208181529281526040808220909352908152208054600182015460028301546003909301546001600160a01b03928316939183169260ff82169161010090041685565b604080516001600160a01b039687168152948616602086015284019290925215156060830152909116608082015260a0015b60405180910390f35b3480156100ec57600080fd5b506101006100fb366004610a1c565b610142565b005b610100610110366004610afe565b6103de565b34801561012157600080fd5b506101356101303660046109ac565b61069d565b6040516100d79190610d98565b6001600160a01b03821660009081526020818152604080832063ffffffff851684529091529020600381015483919060ff16156101b95760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995b19585cd95960821b60448201526064015b60405180910390fd5b60405163118c2bff60e21b815263ffffffff841660048201526000906001600160a01b03841690634630affc9060240160806040518083038186803b15801561020157600080fd5b505afa158015610215573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102399190610a55565b604081015190915061027a5760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185cdcd95960b21b60448201526064016101b0565b60038201805460ff191660019081179182905583549084015460028501546040805163ffffffff8a1681526001600160a01b039384166020820152610100909504831690850152606084015290811691908716907f637fb12bbeb9000df3de89d3f54dba04a8940ff0b762f16937aa1bc12dfc26779060800160405180910390a26001830154600384015460028501546040516323b872dd60e01b81526001600160a01b039384166004820152610100909204831660248301526044820152908216906323b872dd90606401602060405180830381600087803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190610ae3565b6103d65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050505050565b6000886001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561041957600080fd5b505afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610c0b565b61045c906001610e1e565b9050600061046e8a888833863061069d565b90506040518060a001604052808a6001600160a01b03168152602001336001600160a01b031681526020018981526020016000151581526020018b6001600160a01b031663d4b839926040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610519919061095c565b6001600160a01b039081169091528b811660008181526020818152604080832063ffffffff89168452825291829020855181549086166001600160a01b031991821617825591860151600182018054918716919093161790915584820151600282015560608501516003909101805460809096015190941661010002610100600160a81b0319911515919091166001600160a81b0319909516949094179390931790915590516307505ff960e31b8152633a82ffc89034906105e59085908a908a908a90600401610dab565b6020604051808303818588803b1580156105fe57600080fd5b505af1158015610612573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106379190610bf2565b50604080516001600160a01b038b81168252602082018b9052338284015263ffffffff851660608301529151918c16917f1deb8b1e22941ec32a7ed14b2d25bdb44593ab343156feb1c735ec06696221399181900360800190a250505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905084816000815181106106d7576106d7610e84565b6001600160a01b039283166020918202929092010152604051908916602482015263ffffffff8516604482015260009060640160408051601f19818403018152918152602080830180516001600160e01b0316633336c27960e01b179052825191519293506000926107529284928992849291889101610cbe565b60408051601f198184030181529190529050881561082f576040805160018082528183019092526000916020808301908036833701905050905089816000815181106107a0576107a0610e84565b602002602001018181525050600084826040516024016107c1929190610d14565b604051602081830303815290604052632c78fd0360e21b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d600084518560405160200161081b96959493929190610c54565b604051602081830303815290604052925050505b87156108fa5760408051600180825281830190925260009160208083019080368337019050509050888160008151811061086b5761086b610e84565b6020026020010181815250506000848260405160240161088c929190610d14565b6040516020818303038152906040526322936c2360e11b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d60008451856040516020016108e696959493929190610c54565b604051602081830303815290604052925050505b60008160405160240161090d9190610d98565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b1790529450505050509695505050505050565b8051801515811461095757600080fd5b919050565b60006020828403121561096e57600080fd5b815161097981610eb0565b9392505050565b6000806040838503121561099357600080fd5b823561099e81610eb0565b946020939093013593505050565b60008060008060008060c087890312156109c557600080fd5b86356109d081610eb0565b9550602087013594506040870135935060608701356109ee81610eb0565b925060808701356109fe81610ec8565b915060a0870135610a0e81610eb0565b809150509295509295509295565b60008060408385031215610a2f57600080fd5b8235610a3a81610eb0565b91506020830135610a4a81610ec8565b809150509250929050565b600060808284031215610a6757600080fd5b82601f830112610a7657600080fd5b6040516080810181811067ffffffffffffffff82111715610a9957610a99610e9a565b604052808360808101861015610aae57600080fd5b60005b6004811015610ad857610ac382610947565b83526020928301929190910190600101610ab1565b509195945050505050565b600060208284031215610af557600080fd5b61097982610947565b600080600080600080600080610100898b031215610b1b57600080fd5b8835610b2681610eb0565b9750602089810135610b3781610eb0565b975060408a0135965060608a0135955060808a0135945060a08a0135610b5c81610ec8565b935060c08a0135925060e08a013567ffffffffffffffff80821115610b8057600080fd5b818c0191508c601f830112610b9457600080fd5b813581811115610ba657610ba6610e9a565b610bb8601f8201601f19168501610ded565b91508082528d84828501011115610bce57600080fd5b80848401858401376000848284010152508093505050509295985092959890939650565b600060208284031215610c0457600080fd5b5051919050565b600060208284031215610c1d57600080fd5b815161097981610ec8565b60008151808452610c40816020860160208601610e54565b601f01601f19169290920160200192915050565b60008751610c66818460208c01610e54565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351610cae816055840160208801610e54565b0160550198975050505050505050565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251610d03816055850160208701610e54565b919091016055019695505050505050565b604080825283519082018190526000906020906060840190828701845b82811015610d565781516001600160a01b031684529284019290840190600101610d31565b5050508381038285015284518082528583019183019060005b81811015610d8b57835183529284019291840191600101610d6f565b5090979650505050505050565b6020815260006109796020830184610c28565b608081526000610dbe6080830187610c28565b63ffffffff861660208401528460408401528281036060840152610de28185610c28565b979650505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e1657610e16610e9a565b604052919050565b600063ffffffff808316818516808303821115610e4b57634e487b7160e01b600052601160045260246000fd5b01949350505050565b60005b83811015610e6f578181015183820152602001610e57565b83811115610e7e576000848401525b50505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec557600080fd5b50565b63ffffffff81168114610ec557600080fdfea2646970667358221220a3323eb1a602115aba0d9a9bf27a1b961890e40a7d0dbd148bb6b967aef950c264736f6c63430008070033", + "deployedBytecode": "0x60806040526004361061003f5760003560e01c806304a54aa7146100445780633336c279146100e0578063610ac73d146101025780636bd4afe714610115575b600080fd5b34801561005057600080fd5b506100a561005f366004610980565b600060208181529281526040808220909352908152208054600182015460028301546003909301546001600160a01b03928316939183169260ff82169161010090041685565b604080516001600160a01b039687168152948616602086015284019290925215156060830152909116608082015260a0015b60405180910390f35b3480156100ec57600080fd5b506101006100fb366004610a1c565b610142565b005b610100610110366004610afe565b6103de565b34801561012157600080fd5b506101356101303660046109ac565b61069d565b6040516100d79190610d98565b6001600160a01b03821660009081526020818152604080832063ffffffff851684529091529020600381015483919060ff16156101b95760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995b19585cd95960821b60448201526064015b60405180910390fd5b60405163118c2bff60e21b815263ffffffff841660048201526000906001600160a01b03841690634630affc9060240160806040518083038186803b15801561020157600080fd5b505afa158015610215573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102399190610a55565b604081015190915061027a5760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185cdcd95960b21b60448201526064016101b0565b60038201805460ff191660019081179182905583549084015460028501546040805163ffffffff8a1681526001600160a01b039384166020820152610100909504831690850152606084015290811691908716907f637fb12bbeb9000df3de89d3f54dba04a8940ff0b762f16937aa1bc12dfc26779060800160405180910390a26001830154600384015460028501546040516323b872dd60e01b81526001600160a01b039384166004820152610100909204831660248301526044820152908216906323b872dd90606401602060405180830381600087803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103989190610ae3565b6103d65760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050505050565b6000886001600160a01b031663da35c6646040518163ffffffff1660e01b815260040160206040518083038186803b15801561041957600080fd5b505afa15801561042d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104519190610c0b565b61045c906001610e1e565b9050600061046e8a888833863061069d565b90506040518060a001604052808a6001600160a01b03168152602001336001600160a01b031681526020018981526020016000151581526020018b6001600160a01b031663d4b839926040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e157600080fd5b505afa1580156104f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610519919061095c565b6001600160a01b039081169091528b811660008181526020818152604080832063ffffffff89168452825291829020855181549086166001600160a01b031991821617825591860151600182018054918716919093161790915584820151600282015560608501516003909101805460809096015190941661010002610100600160a81b0319911515919091166001600160a81b0319909516949094179390931790915590516307505ff960e31b8152633a82ffc89034906105e59085908a908a908a90600401610dab565b6020604051808303818588803b1580156105fe57600080fd5b505af1158015610612573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106379190610bf2565b50604080516001600160a01b038b81168252602082018b9052338284015263ffffffff851660608301529151918c16917f1deb8b1e22941ec32a7ed14b2d25bdb44593ab343156feb1c735ec06696221399181900360800190a250505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905084816000815181106106d7576106d7610e84565b6001600160a01b039283166020918202929092010152604051908916602482015263ffffffff8516604482015260009060640160408051601f19818403018152918152602080830180516001600160e01b0316633336c27960e01b179052825191519293506000926107529284928992849291889101610cbe565b60408051601f198184030181529190529050881561082f576040805160018082528183019092526000916020808301908036833701905050905089816000815181106107a0576107a0610e84565b602002602001018181525050600084826040516024016107c1929190610d14565b604051602081830303815290604052632c78fd0360e21b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d600084518560405160200161081b96959493929190610c54565b604051602081830303815290604052925050505b87156108fa5760408051600180825281830190925260009160208083019080368337019050509050888160008151811061086b5761086b610e84565b6020026020010181815250506000848260405160240161088c929190610d14565b6040516020818303038152906040526322936c2360e11b6001600160e01b0319166020820180516001600160e01b03838183161783525050505090508260008d60008451856040516020016108e696959493929190610c54565b604051602081830303815290604052925050505b60008160405160240161090d9190610d98565b60408051601f198184030181529190526020810180516001600160e01b03166346c07f8560e11b1790529450505050509695505050505050565b8051801515811461095757600080fd5b919050565b60006020828403121561096e57600080fd5b815161097981610eb0565b9392505050565b6000806040838503121561099357600080fd5b823561099e81610eb0565b946020939093013593505050565b60008060008060008060c087890312156109c557600080fd5b86356109d081610eb0565b9550602087013594506040870135935060608701356109ee81610eb0565b925060808701356109fe81610ec8565b915060a0870135610a0e81610eb0565b809150509295509295509295565b60008060408385031215610a2f57600080fd5b8235610a3a81610eb0565b91506020830135610a4a81610ec8565b809150509250929050565b600060808284031215610a6757600080fd5b82601f830112610a7657600080fd5b6040516080810181811067ffffffffffffffff82111715610a9957610a99610e9a565b604052808360808101861015610aae57600080fd5b60005b6004811015610ad857610ac382610947565b83526020928301929190910190600101610ab1565b509195945050505050565b600060208284031215610af557600080fd5b61097982610947565b600080600080600080600080610100898b031215610b1b57600080fd5b8835610b2681610eb0565b9750602089810135610b3781610eb0565b975060408a0135965060608a0135955060808a0135945060a08a0135610b5c81610ec8565b935060c08a0135925060e08a013567ffffffffffffffff80821115610b8057600080fd5b818c0191508c601f830112610b9457600080fd5b813581811115610ba657610ba6610e9a565b610bb8601f8201601f19168501610ded565b91508082528d84828501011115610bce57600080fd5b80848401858401376000848284010152508093505050509295985092959890939650565b600060208284031215610c0457600080fd5b5051919050565b600060208284031215610c1d57600080fd5b815161097981610ec8565b60008151808452610c40816020860160208601610e54565b601f01601f19169290920160200192915050565b60008751610c66818460208c01610e54565b808301905060ff60f81b8860f81b1681526bffffffffffffffffffffffff198760601b1660018201528560158201528460358201528351610cae816055840160208801610e54565b0160550198975050505050505050565b60ff60f81b8660f81b1681526bffffffffffffffffffffffff198560601b16600182015283601582015282603582015260008251610d03816055850160208701610e54565b919091016055019695505050505050565b604080825283519082018190526000906020906060840190828701845b82811015610d565781516001600160a01b031684529284019290840190600101610d31565b5050508381038285015284518082528583019183019060005b81811015610d8b57835183529284019291840191600101610d6f565b5090979650505050505050565b6020815260006109796020830184610c28565b608081526000610dbe6080830187610c28565b63ffffffff861660208401528460408401528281036060840152610de28185610c28565b979650505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e1657610e16610e9a565b604052919050565b600063ffffffff808316818516808303821115610e4b57634e487b7160e01b600052601160045260246000fd5b01949350505050565b60005b83811015610e6f578181015183820152602001610e57565b83811115610e7e576000848401525b50505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec557600080fd5b50565b63ffffffff81168114610ec557600080fdfea2646970667358221220a3323eb1a602115aba0d9a9bf27a1b961890e40a7d0dbd148bb6b967aef950c264736f6c63430008070033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 15153, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "escrows", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Escrow)15146_storage))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Escrow)15146_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct TributeMinion.Escrow))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Escrow)15146_storage)" + }, + "t_mapping(t_uint256,t_struct(Escrow)15146_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct TributeMinion.Escrow)", + "numberOfBytes": "32", + "value": "t_struct(Escrow)15146_storage" + }, + "t_struct(Escrow)15146_storage": { + "encoding": "inplace", + "label": "struct TributeMinion.Escrow", + "members": [ + { + "astId": 15137, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "token", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 15139, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "applicant", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 15141, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "amount", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 15143, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "released", + "offset": 0, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 15145, + "contract": "contracts/tools/TributeMinion.sol:TributeMinion", + "label": "safe", + "offset": 1, + "slot": "3", + "type": "t_address" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json b/deployments/sepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json new file mode 100644 index 0000000..6eb5ed9 --- /dev/null +++ b/deployments/sepolia/solcInputs/0e89febeebc7444140de8e67c9067d2c.json @@ -0,0 +1,80 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/openzeppelin/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor (address initialOwner) {\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/openzeppelin/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n\n constructor (address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n TransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view virtual returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(Address.isContract(IBeacon(newBeacon).implementation()), \"ERC1967: beacon implementation is not a contract\");\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "solc_0.8/openzeppelin/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "solc_0.8/openzeppelin/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\n address internal immutable _ADMIN;\n\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _ADMIN = admin_;\n\n // still store it to work with EIP-1967\n bytes32 slot = _ADMIN_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, admin_)\n }\n emit AdminChanged(address(0), admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n\n function _getAdmin() internal view virtual override returns (address) {\n return _ADMIN;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade {\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate that the this implementation remains valid after an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n}\n" + }, + "solc_0.8/openzeppelin/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n\n constructor(address implementation_, address initialOwner) Ownable(initialOwner) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "solc_0.8/openzeppelin/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from a {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n assert(_BEACON_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.beacon\")) - 1));\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\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 + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/928daf6847beb441da40e990eb20d125.json b/deployments/sepolia/solcInputs/928daf6847beb441da40e990eb20d125.json new file mode 100644 index 0000000..fb39b99 --- /dev/null +++ b/deployments/sepolia/solcInputs/928daf6847beb441da40e990eb20d125.json @@ -0,0 +1,284 @@ +{ + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/base/Executor.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - \ncontract Executor {\n function execute(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 txGas\n ) internal returns (bool success) {\n if (operation == Enum.Operation.DelegateCall) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n } else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract FallbackManager is SelfAuthorized {\n event ChangedFallbackHandler(address handler);\n\n // keccak256(\"fallback_manager.handler.address\")\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\n\n function internalSetFallbackHandler(address handler) internal {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, handler)\n }\n }\n\n /// @dev Allows to add a contract to handle fallback calls.\n /// Only fallback calls without value and with data will be forwarded.\n /// This can only be done via a Safe transaction.\n /// @param handler contract to handle fallbacks calls.\n function setFallbackHandler(address handler) public authorized {\n internalSetFallbackHandler(handler);\n emit ChangedFallbackHandler(handler);\n }\n\n // solhint-disable-next-line payable-fallback,no-complex-fallback\n fallback() external {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let handler := sload(slot)\n if iszero(handler) {\n return(0, 0)\n }\n calldatacopy(0, 0, calldatasize())\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n mstore(calldatasize(), shl(96, caller()))\n // Add 20 bytes for the address appended add the end\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if iszero(success) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\n\ninterface Guard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract GuardManager is SelfAuthorized {\n event ChangedGuard(address guard);\n // keccak256(\"guard_manager.guard.address\")\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address guard) external authorized {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, guard)\n }\n emit ChangedGuard(guard);\n }\n\n function getGuard() internal view returns (address guard) {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n guard := sload(slot)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\nimport \"./Executor.sol\";\n\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract ModuleManager is SelfAuthorized, Executor {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n address internal constant SENTINEL_MODULES = address(0x1);\n\n mapping(address => address) internal modules;\n\n function setupModules(address to, bytes memory data) internal {\n require(modules[SENTINEL_MODULES] == address(0), \"GS100\");\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n if (to != address(0))\n // Setup has to complete successfully or transaction fails.\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \"GS000\");\n }\n\n /// @dev Allows to add a module to the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Enables the module `module` for the Safe.\n /// @param module Module to be whitelisted.\n function enableModule(address module) public authorized {\n // Module address cannot be null or sentinel.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n // Module cannot be added twice.\n require(modules[module] == address(0), \"GS102\");\n modules[module] = modules[SENTINEL_MODULES];\n modules[SENTINEL_MODULES] = module;\n emit EnabledModule(module);\n }\n\n /// @dev Allows to remove a module from the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Disables the module `module` for the Safe.\n /// @param prevModule Module that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) public authorized {\n // Validate module address and check that it corresponds to module index.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n require(modules[prevModule] == module, \"GS103\");\n modules[prevModule] = modules[module];\n modules[module] = address(0);\n emit DisabledModule(module);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public virtual returns (bool success) {\n // Only whitelisted modules are allowed.\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \"GS104\");\n // Execute transaction without further confirmations.\n success = execute(to, value, data, operation, gasleft());\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) public view returns (bool) {\n return SENTINEL_MODULES != module && modules[module] != address(0);\n }\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 moduleCount = 0;\n address currentModule = modules[start];\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\n array[moduleCount] = currentModule;\n currentModule = modules[currentModule];\n moduleCount++;\n }\n next = currentModule;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, moduleCount)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract OwnerManager is SelfAuthorized {\n event AddedOwner(address owner);\n event RemovedOwner(address owner);\n event ChangedThreshold(uint256 threshold);\n\n address internal constant SENTINEL_OWNERS = address(0x1);\n\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\n // Threshold can only be 0 at initialization.\n // Check ensures that setup function can only be called once.\n require(threshold == 0, \"GS200\");\n // Validate that threshold is smaller than number of added owners.\n require(_threshold <= _owners.length, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n // Initializing Safe owners.\n address currentOwner = SENTINEL_OWNERS;\n for (uint256 i = 0; i < _owners.length; i++) {\n // Owner address cannot be null.\n address owner = _owners[i];\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[currentOwner] = owner;\n currentOwner = owner;\n }\n owners[currentOwner] = SENTINEL_OWNERS;\n ownerCount = _owners.length;\n threshold = _threshold;\n }\n\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\n /// @param owner New owner address.\n /// @param _threshold New threshold.\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[owner] = owners[SENTINEL_OWNERS];\n owners[SENTINEL_OWNERS] = owner;\n ownerCount++;\n emit AddedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\n /// @param owner Owner address to be removed.\n /// @param _threshold New threshold.\n function removeOwner(\n address prevOwner,\n address owner,\n uint256 _threshold\n ) public authorized {\n // Only allow to remove an owner, if threshold can still be reached.\n require(ownerCount - 1 >= _threshold, \"GS201\");\n // Validate owner address and check that it corresponds to owner index.\n require(owner != address(0) && owner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == owner, \"GS205\");\n owners[prevOwner] = owners[owner];\n owners[owner] = address(0);\n ownerCount--;\n emit RemovedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to swap/replace an owner from the Safe with another address.\n /// This can only be done via a Safe transaction.\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n function swapOwner(\n address prevOwner,\n address oldOwner,\n address newOwner\n ) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[newOwner] == address(0), \"GS204\");\n // Validate oldOwner address and check that it corresponds to owner index.\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == oldOwner, \"GS205\");\n owners[newOwner] = owners[oldOwner];\n owners[prevOwner] = newOwner;\n owners[oldOwner] = address(0);\n emit RemovedOwner(oldOwner);\n emit AddedOwner(newOwner);\n }\n\n /// @dev Allows to update the number of required confirmations by Safe owners.\n /// This can only be done via a Safe transaction.\n /// @notice Changes the threshold of the Safe to `_threshold`.\n /// @param _threshold New threshold.\n function changeThreshold(uint256 _threshold) public authorized {\n // Validate that threshold is smaller than number of owners.\n require(_threshold <= ownerCount, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n threshold = _threshold;\n emit ChangedThreshold(threshold);\n }\n\n function getThreshold() public view returns (uint256) {\n return threshold;\n }\n\n function isOwner(address owner) public view returns (bool) {\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\n }\n\n /// @dev Returns array of owners.\n /// @return Array of Safe owners.\n function getOwners() public view returns (address[] memory) {\n address[] memory array = new address[](ownerCount);\n\n // populate return array\n uint256 index = 0;\n address currentOwner = owners[SENTINEL_OWNERS];\n while (currentOwner != SENTINEL_OWNERS) {\n array[index] = currentOwner;\n currentOwner = owners[currentOwner];\n index++;\n }\n return array;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\n/// @author Richard Meissner - \ncontract EtherPaymentFallback {\n event SafeReceived(address indexed sender, uint256 value);\n\n /// @dev Fallback function accepts Ether transactions.\n receive() external payable {\n emit SafeReceived(msg.sender, msg.value);\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SecuredTokenTransfer - Secure token transfer\n/// @author Richard Meissner - \ncontract SecuredTokenTransfer {\n /// @dev Transfers a token and returns if it was a success\n /// @param token Token that should be transferred\n /// @param receiver Receiver to whom the token should be transferred\n /// @param amount The amount of tokens that should be transferred\n function transferToken(\n address token,\n address receiver,\n uint256 amount\n ) internal returns (bool transferred) {\n // 0xa9059cbb - keccack(\"transfer(address,uint256)\")\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // We write the return value to scratch space.\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n switch returndatasize()\n case 0 {\n transferred := success\n }\n case 0x20 {\n transferred := iszero(or(iszero(success), iszero(mload(0))))\n }\n default {\n transferred := 0\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - \ncontract SelfAuthorized {\n function requireSelfCall() private view {\n require(msg.sender == address(this), \"GS031\");\n }\n\n modifier authorized() {\n // This is a function call as it minimized the bytecode size\n requireSelfCall();\n _;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\n/// @author Richard Meissner - \ncontract SignatureDecoder {\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Singleton.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\n/// @author Richard Meissner - \ncontract Singleton {\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\n // It should also always be ensured that the address is stored alone (uses a full word)\n address private singleton;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\ncontract StorageAccessible {\n /**\n * @dev Reads `length` bytes of storage in the currents contract\n * @param offset - the offset in the current contract's storage in words to start reading from\n * @param length - the number of words (32 bytes) of data to read\n * @return the bytes that were read.\n */\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\n bytes memory result = new bytes(length * 32);\n for (uint256 index = 0; index < length; index++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let word := sload(add(offset, index))\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n }\n }\n return result;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static).\n *\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\n * Specifically, the `returndata` after a call to this method will be:\n * `success:bool || response.length:uint256 || response:bytes`.\n *\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\n\n mstore(0x00, success)\n mstore(0x20, returndatasize())\n returndatacopy(0x40, 0, returndatasize())\n revert(0, add(returndatasize(), 0x40))\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/GnosisSafeStorage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title GnosisSafeStorage - Storage layout of the Safe contracts to be used in libraries\n/// @author Richard Meissner - \ncontract GnosisSafeStorage {\n // From /common/Singleton.sol\n address internal singleton;\n // From /common/ModuleManager.sol\n mapping(address => address) internal modules;\n // From /common/OwnerManager.sol\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n // From /GnosisSafe.sol\n bytes32 internal nonce;\n bytes32 internal domainSeparator;\n mapping(bytes32 => uint256) internal signedMessages;\n mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeStorage.sol\";\nimport \"../../GnosisSafe.sol\";\n\n/// @title SignMessageLib - Allows to set an entry in the signedMessages\n/// @author Richard Meissner - \ncontract SignMessageLib is GnosisSafeStorage {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n event SignMsg(bytes32 indexed msgHash);\n\n /// @dev Marks a message as signed, so that it can be used with EIP-1271\n /// @notice Marks a message (`_data`) as signed.\n /// @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)\n function signMessage(bytes calldata _data) external {\n bytes32 msgHash = getMessageHash(_data);\n signedMessages[msgHash] = 1;\n emit SignMsg(msgHash);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return\n keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), GnosisSafe(payable(address(this))).domainSeparator(), safeMessageHash));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title GnosisSafeMath\n * @dev Math operations with safety checks that revert on error\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\n * TODO: remove once open zeppelin update to solc 0.5.0\n */\nlibrary GnosisSafeMath {\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./base/ModuleManager.sol\";\nimport \"./base/OwnerManager.sol\";\nimport \"./base/FallbackManager.sol\";\nimport \"./base/GuardManager.sol\";\nimport \"./common/EtherPaymentFallback.sol\";\nimport \"./common/Singleton.sol\";\nimport \"./common/SignatureDecoder.sol\";\nimport \"./common/SecuredTokenTransfer.sol\";\nimport \"./common/StorageAccessible.sol\";\nimport \"./interfaces/ISignatureValidator.sol\";\nimport \"./external/GnosisSafeMath.sol\";\n\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafe is\n EtherPaymentFallback,\n Singleton,\n ModuleManager,\n OwnerManager,\n SignatureDecoder,\n SecuredTokenTransfer,\n ISignatureValidatorConstants,\n FallbackManager,\n StorageAccessible,\n GuardManager\n{\n using GnosisSafeMath for uint256;\n\n string public constant VERSION = \"1.3.0\";\n\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n // keccak256(\n // \"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\"\n // );\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\n\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\n event SignMsg(bytes32 indexed msgHash);\n event ExecutionFailure(bytes32 txHash, uint256 payment);\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\n\n uint256 public nonce;\n bytes32 private _deprecatedDomainSeparator;\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\n mapping(bytes32 => uint256) public signedMessages;\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\n\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\n constructor() {\n // By setting the threshold it is not possible to call setup anymore,\n // so we create a Safe with 0 owners and threshold 1.\n // This is an unusable Safe, perfect for the singleton\n threshold = 1;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n /// @param to Contract address for optional delegate call.\n /// @param data Data payload for optional delegate call.\n /// @param fallbackHandler Handler for fallback calls to this contract\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\n function setup(\n address[] calldata _owners,\n uint256 _threshold,\n address to,\n bytes calldata data,\n address fallbackHandler,\n address paymentToken,\n uint256 payment,\n address payable paymentReceiver\n ) external {\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\n setupOwners(_owners, _threshold);\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\n setupModules(to, data);\n\n if (payment > 0) {\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\n }\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\n }\n\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\n /// Note: The fees are always transferred, even if the user transaction fails.\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @param safeTxGas Gas that should be used for the Safe transaction.\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Gas price that should be used for the payment calculation.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\n function execTransaction(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures\n ) public payable virtual returns (bool success) {\n bytes32 txHash;\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n bytes memory txHashData =\n encodeTransactionData(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n nonce\n );\n // Increase nonce and execute transaction.\n nonce++;\n txHash = keccak256(txHashData);\n checkSignatures(txHash, txHashData, signatures);\n }\n address guard = getGuard();\n {\n if (guard != address(0)) {\n Guard(guard).checkTransaction(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n signatures,\n msg.sender\n );\n }\n }\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \"GS010\");\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n uint256 gasUsed = gasleft();\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\n gasUsed = gasUsed.sub(gasleft());\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\n require(success || safeTxGas != 0 || gasPrice != 0, \"GS013\");\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\n uint256 payment = 0;\n if (gasPrice > 0) {\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\n }\n if (success) emit ExecutionSuccess(txHash, payment);\n else emit ExecutionFailure(txHash, payment);\n }\n {\n if (guard != address(0)) {\n Guard(guard).checkAfterExecution(txHash, success);\n }\n }\n }\n\n function handlePayment(\n uint256 gasUsed,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver\n ) private returns (uint256 payment) {\n // solhint-disable-next-line avoid-tx-origin\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\n if (gasToken == address(0)) {\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\n require(receiver.send(payment), \"GS011\");\n } else {\n payment = gasUsed.add(baseGas).mul(gasPrice);\n require(transferToken(gasToken, receiver, payment), \"GS012\");\n }\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n */\n function checkSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures\n ) public view {\n // Load threshold to avoid multiple storage loads\n uint256 _threshold = threshold;\n // Check that a threshold is set\n require(_threshold > 0, \"GS001\");\n checkNSignatures(dataHash, data, signatures, _threshold);\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n * @param requiredSignatures Amount of required valid signatures.\n */\n function checkNSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures,\n uint256 requiredSignatures\n ) public view {\n // Check that the provided signature data is not too short\n require(signatures.length >= requiredSignatures.mul(65), \"GS020\");\n // There cannot be an owner with address 0.\n address lastOwner = address(0);\n address currentOwner;\n uint8 v;\n bytes32 r;\n bytes32 s;\n uint256 i;\n for (i = 0; i < requiredSignatures; i++) {\n (v, r, s) = signatureSplit(signatures, i);\n if (v == 0) {\n // If v is 0 then it is a contract signature\n // When handling contract signatures the address of the contract is encoded into r\n currentOwner = address(uint160(uint256(r)));\n\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\n // Here we only check that the pointer is not pointing inside the part that is being processed\n require(uint256(s) >= requiredSignatures.mul(65), \"GS021\");\n\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\n require(uint256(s).add(32) <= signatures.length, \"GS022\");\n\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\n uint256 contractSignatureLen;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\n }\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \"GS023\");\n\n // Check signature\n bytes memory contractSignature;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\n contractSignature := add(add(signatures, s), 0x20)\n }\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \"GS024\");\n } else if (v == 1) {\n // If v is 1 then it is an approved hash\n // When handling approved hashes the address of the approver is encoded into r\n currentOwner = address(uint160(uint256(r)));\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \"GS025\");\n } else if (v > 30) {\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\n currentOwner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", dataHash)), v - 4, r, s);\n } else {\n // Default is the ecrecover flow with the provided data hash\n // Use ecrecover with the messageHash for EOA signatures\n currentOwner = ecrecover(dataHash, v, r, s);\n }\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \"GS026\");\n lastOwner = currentOwner;\n }\n }\n\n /// @dev Allows to estimate a Safe transaction.\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\n function requiredTxGas(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation\n ) external returns (uint256) {\n uint256 startGas = gasleft();\n // We don't provide an error message here, as we use it to return the estimate\n require(execute(to, value, data, operation, gasleft()));\n uint256 requiredGas = startGas - gasleft();\n // Convert response to string and return via error message\n revert(string(abi.encodePacked(requiredGas)));\n }\n\n /**\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\n */\n function approveHash(bytes32 hashToApprove) external {\n require(owners[msg.sender] != address(0), \"GS030\");\n approvedHashes[msg.sender][hashToApprove] = 1;\n emit ApproveHash(hashToApprove, msg.sender);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n function domainSeparator() public view returns (bytes32) {\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\n }\n\n /// @dev Returns the bytes that are hashed to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Gas that should be used for the safe transaction.\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash bytes.\n function encodeTransactionData(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes memory) {\n bytes32 safeTxHash =\n keccak256(\n abi.encode(\n SAFE_TX_TYPEHASH,\n to,\n value,\n keccak256(data),\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n _nonce\n )\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\n }\n\n /// @dev Returns hash to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Fas that should be used for the safe transaction.\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash.\n function getTransactionHash(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes32) {\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./DefaultCallbackHandler.sol\";\nimport \"../interfaces/ISignatureValidator.sol\";\nimport \"../GnosisSafe.sol\";\n\n/// @title Compatibility Fallback Handler - fallback handler to provider compatibility between pre 1.3.0 and 1.3.0+ Safe contracts\n/// @author Richard Meissner - \ncontract CompatibilityFallbackHandler is DefaultCallbackHandler, ISignatureValidator {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256(\"simulate(address,bytes)\"));\n\n address internal constant SENTINEL_MODULES = address(0x1);\n bytes4 internal constant UPDATED_MAGIC_VALUE = 0x1626ba7e;\n\n /**\n * Implementation of ISignatureValidator (see `interfaces/ISignatureValidator.sol`)\n * @dev Should return whether the signature provided is valid for the provided data.\n * @param _data Arbitrary length data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _data\n * @return a bool upon valid or invalid signature with corresponding _data\n */\n function isValidSignature(bytes calldata _data, bytes calldata _signature) public view override returns (bytes4) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n bytes32 messageHash = getMessageHashForSafe(safe, _data);\n if (_signature.length == 0) {\n require(safe.signedMessages(messageHash) != 0, \"Hash not approved\");\n } else {\n safe.checkSignatures(messageHash, _data, _signature);\n }\n return EIP1271_MAGIC_VALUE;\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n return getMessageHashForSafe(GnosisSafe(payable(msg.sender)), message);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param safe Safe to which the message is targeted\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHashForSafe(GnosisSafe safe, bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), safe.domainSeparator(), safeMessageHash));\n }\n\n /**\n * Implementation of updated EIP-1271\n * @dev Should return whether the signature provided is valid for the provided data.\n * The save does not implement the interface since `checkSignatures` is not a view method.\n * The method will not perform any state changes (see parameters of `checkSignatures`)\n * @param _dataHash Hash of the data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _dataHash\n * @return a bool upon valid or invalid signature with corresponding _dataHash\n * @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\n */\n function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view returns (bytes4) {\n ISignatureValidator validator = ISignatureValidator(msg.sender);\n bytes4 value = validator.isValidSignature(abi.encode(_dataHash), _signature);\n return (value == EIP1271_MAGIC_VALUE) ? UPDATED_MAGIC_VALUE : bytes4(0);\n }\n\n /// @dev Returns array of first 10 modules.\n /// @return Array of modules.\n function getModules() external view returns (address[] memory) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n (address[] memory array, ) = safe.getModulesPaginated(SENTINEL_MODULES, 10);\n return array;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulate(address targetContract, bytes calldata calldataPayload) external returns (bytes memory response) {\n // Suppress compiler warnings about not using parameters, while allowing\n // parameters to keep names for documentation purposes. This does not\n // generate code.\n targetContract;\n calldataPayload;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let internalCalldata := mload(0x40)\n // Store `simulateAndRevert.selector`.\n // String representation is used to force right padding\n mstore(internalCalldata, \"\\xb4\\xfa\\xba\\x09\")\n // Abuse the fact that both this and the internal methods have the\n // same signature, and differ only in symbol name (and therefore,\n // selector) and copy calldata directly. This saves us approximately\n // 250 bytes of code and 300 gas at runtime over the\n // `abi.encodeWithSelector` builtin.\n calldatacopy(add(internalCalldata, 0x04), 0x04, sub(calldatasize(), 0x04))\n\n // `pop` is required here by the compiler, as top level expressions\n // can't have return values in inline assembly. `call` typically\n // returns a 0 or 1 value indicated whether or not it reverted, but\n // since we know it will always revert, we can safely ignore it.\n pop(\n call(\n gas(),\n // address() has been changed to caller() to use the implementation of the Safe\n caller(),\n 0,\n internalCalldata,\n calldatasize(),\n // The `simulateAndRevert` call always reverts, and\n // instead encodes whether or not it was successful in the return\n // data. The first 32-byte word of the return data contains the\n // `success` value, so write it to memory address 0x00 (which is\n // reserved Solidity scratch space and OK to use).\n 0x00,\n 0x20\n )\n )\n\n // Allocate and copy the response bytes, making sure to increment\n // the free memory pointer accordingly (in case this method is\n // called as an internal function). The remaining `returndata[0x20:]`\n // contains the ABI encoded response bytes, so we can just write it\n // as is to memory.\n let responseSize := sub(returndatasize(), 0x20)\n response := mload(0x40)\n mstore(0x40, add(response, responseSize))\n returndatacopy(response, 0x20, responseSize)\n\n if iszero(mload(0x00)) {\n revert(add(response, 0x20), mload(response))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/DefaultCallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/ERC1155TokenReceiver.sol\";\nimport \"../interfaces/ERC721TokenReceiver.sol\";\nimport \"../interfaces/ERC777TokensRecipient.sol\";\nimport \"../interfaces/IERC165.sol\";\n\n/// @title Default Callback Handler - returns true for known token callbacks\n/// @author Richard Meissner - \ncontract DefaultCallbackHandler is ERC1155TokenReceiver, ERC777TokensRecipient, ERC721TokenReceiver, IERC165 {\n string public constant NAME = \"Default Callback Handler\";\n string public constant VERSION = \"1.0.0\";\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xbc197c81;\n }\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0x150b7a02;\n }\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n ) external pure override {\n // We implement this for completeness, doesn't really have any value\n }\n\n function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {\n return\n interfaceId == type(ERC1155TokenReceiver).interfaceId ||\n interfaceId == type(ERC721TokenReceiver).interfaceId ||\n interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC1155TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\n*/\ninterface ERC1155TokenReceiver {\n /**\n @notice Handle the receipt of a single ERC1155 token type.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\n This function MUST revert if it rejects the transfer.\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _id The ID of the token being transferred\n @param _value The amount of tokens being transferred\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 _id,\n uint256 _value,\n bytes calldata _data\n ) external returns (bytes4);\n\n /**\n @notice Handle the receipt of multiple ERC1155 token types.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\n This function MUST revert if it rejects the transfer(s).\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata _ids,\n uint256[] calldata _values,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC777TokensRecipient.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface ERC777TokensRecipient {\n function tokensReceived(\n address operator,\n address from,\n address to,\n uint256 amount,\n bytes calldata data,\n bytes calldata operatorData\n ) external;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @notice More details at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ncontract ISignatureValidatorConstants {\n // bytes4(keccak256(\"isValidSignature(bytes,bytes)\")\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\n}\n\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n *\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - \n/// @author Gonçalo Sá - \n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract MultiSend {\n address private immutable multisendSingleton;\n\n constructor() {\n multisendSingleton = address(this);\n }\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions. Each transaction is encoded as a packed bytes of\n /// operation as a uint8 with 0 for a call or 1 for a delegatecall (=> 1 byte),\n /// to as a address (=> 20 bytes),\n /// value as a uint256 (=> 32 bytes),\n /// data length as a uint256 (=> 32 bytes),\n /// data as bytes.\n /// see abi.encodePacked for more information on packed encoding\n /// @notice This method is payable as delegatecalls keep the msg.value from the previous call\n /// If the calling method (e.g. execTransaction) received ETH this would revert otherwise\n function multiSend(bytes memory transactions) public payable {\n require(address(this) != multisendSingleton, \"MultiSend should only be called via delegatecall\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let length := mload(transactions)\n let i := 0x20\n for {\n // Pre block is not used in \"while mode\"\n } lt(i, length) {\n // Post block is not used in \"while mode\"\n } {\n // First byte of the data is the operation.\n // We shift by 248 bits (256 - 8 [operation byte]) it right since mload will always load 32 bytes (a word).\n // This will also zero out unused data.\n let operation := shr(0xf8, mload(add(transactions, i)))\n // We offset the load address by 1 byte (operation byte)\n // We shift it right by 96 bits (256 - 160 [20 address bytes]) to right-align the data and zero out unused data.\n let to := shr(0x60, mload(add(transactions, add(i, 0x01))))\n // We offset the load address by 21 byte (operation byte + 20 address bytes)\n let value := mload(add(transactions, add(i, 0x15)))\n // We offset the load address by 53 byte (operation byte + 20 address bytes + 32 value bytes)\n let dataLength := mload(add(transactions, add(i, 0x35)))\n // We offset the load address by 85 byte (operation byte + 20 address bytes + 32 value bytes + 32 data length bytes)\n let data := add(transactions, add(i, 0x55))\n let success := 0\n switch operation\n case 0 {\n success := call(gas(), to, value, data, dataLength, 0, 0)\n }\n case 1 {\n success := delegatecall(gas(), to, data, dataLength, 0, 0)\n }\n if eq(success, 0) {\n revert(0, 0)\n }\n // Next entry starts at 85 byte + data length\n i := add(i, add(0x55, dataLength))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\n/// @author Richard Meissner - \ninterface IProxy {\n function masterCopy() external view returns (address);\n}\n\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafeProxy {\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\n address internal singleton;\n\n /// @dev Constructor function sets address of singleton contract.\n /// @param _singleton Singleton address.\n constructor(address _singleton) {\n require(_singleton != address(0), \"Invalid singleton address provided\");\n singleton = _singleton;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n fallback() external payable {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n // 0xa619486e == keccak(\"masterCopy()\"). The value is right padded to 32-bytes with 0s\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\n mstore(0, _singleton)\n return(0, 0x20)\n }\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeProxy.sol\";\nimport \"./IProxyCreationCallback.sol\";\n\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n/// @author Stefan George - \ncontract GnosisSafeProxyFactory {\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param singleton Address of singleton contract.\n /// @param data Payload for message call sent to new proxy contract.\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\n proxy = new GnosisSafeProxy(singleton);\n if (data.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, singleton);\n }\n\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\n function proxyRuntimeCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).runtimeCode;\n }\n\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\n function proxyCreationCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).creationCode;\n }\n\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\n /// This method is only meant as an utility to be called from other methods\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function deployProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) internal returns (GnosisSafeProxy proxy) {\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\n // solhint-disable-next-line no-inline-assembly\n assembly {\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\n }\n require(address(proxy) != address(0), \"Create2 call failed\");\n }\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function createProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n if (initializer.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, _singleton);\n }\n\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\n function createProxyWithCallback(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce,\n IProxyCreationCallback callback\n ) public returns (GnosisSafeProxy proxy) {\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\n }\n\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function calculateCreateProxyWithNonceAddress(\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n revert(string(abi.encodePacked(proxy)));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"./GnosisSafeProxy.sol\";\n\ninterface IProxyCreationCallback {\n function proxyCreated(\n GnosisSafeProxy proxy,\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n (success, ) = _exec(to, value, data, operation);\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n (success, returnData) = _exec(to, value, data, operation);\n }\n\n function _exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) private returns (bool success, bytes memory returnData) {\n address currentGuard = guard;\n if (currentGuard != address(0)) {\n IGuard(currentGuard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n \"\",\n msg.sender\n );\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n IGuard(currentGuard).checkAfterExecution(\"\", success);\n } else {\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n }\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract ModuleProxyFactory {\n event ModuleProxyCreation(\n address indexed proxy,\n address indexed masterCopy\n );\n\n /// `target` can not be zero.\n error ZeroAddress(address target);\n\n /// `target` has no code deployed.\n error TargetHasNoCode(address target);\n\n /// `address_` is already taken.\n error TakenAddress(address address_);\n\n /// @notice Initialization failed.\n error FailedInitialization();\n\n function createProxy(address target, bytes32 salt)\n internal\n returns (address result)\n {\n if (address(target) == address(0)) revert ZeroAddress(target);\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\n bytes memory deployment = abi.encodePacked(\n hex\"602d8060093d393df3363d3d373d3d3d363d73\",\n target,\n hex\"5af43d82803e903d91602b57fd5bf3\"\n );\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\n }\n if (result == address(0)) revert TakenAddress(result);\n }\n\n function deployModule(\n address masterCopy,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (address proxy) {\n proxy = createProxy(\n masterCopy,\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\n );\n (bool success, ) = proxy.call(initializer);\n if (!success) revert FailedInitialization();\n\n emit ModuleProxyCreation(proxy, masterCopy);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@opengsn/contracts/src/BaseRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable no-inline-assembly\npragma solidity >=0.6.9;\n\nimport \"./interfaces/IRelayRecipient.sol\";\n\n/**\n * A base contract to be inherited by any contract that want to receive relayed transactions\n * A subclass must use \"_msgSender()\" instead of \"msg.sender\"\n */\nabstract contract BaseRelayRecipient is IRelayRecipient {\n\n /*\n * Forwarder singleton we accept calls from\n */\n address private _trustedForwarder;\n\n function trustedForwarder() public virtual view returns (address){\n return _trustedForwarder;\n }\n\n function _setTrustedForwarder(address _forwarder) internal {\n _trustedForwarder = _forwarder;\n }\n\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\n return forwarder == _trustedForwarder;\n }\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, return the original sender.\n * otherwise, return `msg.sender`.\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal override virtual view returns (address ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n // At this point we know that the sender is a trusted forwarder,\n // so we trust that the last bytes of msg.data are the verified sender address.\n // extract sender address from the end of msg.data\n assembly {\n ret := shr(96,calldataload(sub(calldatasize(),20)))\n }\n } else {\n ret = msg.sender;\n }\n }\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal override virtual view returns (bytes calldata ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n return msg.data[0:msg.data.length-20];\n } else {\n return msg.data;\n }\n }\n}\n" + }, + "@opengsn/contracts/src/interfaces/IRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\n/**\n * a contract must implement this interface in order to support relayed transaction.\n * It is better to inherit the BaseRelayRecipient as its implementation.\n */\nabstract contract IRelayRecipient {\n\n /**\n * return if the forwarder is trusted to forward relayed transactions to us.\n * the forwarder is required to verify the sender's signature, and verify\n * the call is not a replay.\n */\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\n * of the msg.data.\n * otherwise, return `msg.sender`\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal virtual view returns (address);\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal virtual view returns (bytes calldata);\n\n function versionRecipient() external virtual view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private constant _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n /**\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n * However, to ensure consistency with the upgradeable transpiler, we will continue\n * to reserve a slot.\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\n */\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\n __EIP712_init_unchained(name, \"1\");\n }\n\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n function __ERC20Snapshot_init() internal onlyInitializing {\n }\n\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n }\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using ArraysUpgradeable for uint256[];\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n CountersUpgradeable.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./StorageSlotUpgradeable.sol\";\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n using StorageSlotUpgradeable for bytes32;\n\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (unsafeAccess(array, mid).value > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getAddressSlot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getBytes32Slot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getUint256Slot();\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\n\nimport \"./EIP712Upgradeable.sol\";\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlotUpgradeable {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/Clones.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address implementation, bytes32 salt)\n internal\n view\n returns (address predicted)\n {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "contracts/Baal.sol": { + "content": "// SPDX-License-Identifier: MIT\n/*\n███ ██ ██ █\n█ █ █ █ █ █ █\n█ ▀ ▄ █▄▄█ █▄▄█ █\n█ ▄▀ █ █ █ █ ███▄\n███ █ █ ▀\n █ █\n ▀ ▀*/\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\";\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@opengsn/contracts/src/BaseRelayRecipient.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\nimport \"./interfaces/IBaalToken.sol\";\n\n/// @title Baal ';_;'.\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\n using ECDSAUpgradeable for bytes32;\n\n // ERC20 SHARES + LOOT\n\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\n\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\n\n // GOVERNANCE PARAMS\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\n uint256 public proposalOffering; /* non-member proposal offering*/\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\n\n // SHAMAN PERMISSIONS\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\n /* permissions registry for shamans\n 0 = no permission\n 1 = admin only\n 2 = manager only\n 4 = governance only\n 3 = admin + manager\n 5 = admin + governance\n 6 = manager + governance\n 7 = admin + manager + governance */\n\n // PROPOSAL TRACKING\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\n\n // MISCELLANEOUS PARAMS\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\n address public multisendLibrary; /*address of multisend library*/\n string public override versionRecipient; /* version recipient for OpenGSN */\n\n // SIGNATURE HELPERS\n bytes32 constant VOTE_TYPEHASH = keccak256(\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\");\n\n // DATA STRUCTURES\n struct Proposal {\n /*Baal proposal details*/\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\n uint256 baalGas; /* gas needed to process proposal */\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\n }\n\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n \\-> Cancelled \\-> Defeated */\n enum ProposalState {\n Unborn, /* 0 - can submit */\n Submitted, /* 1 - can sponsor -> voting */\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\n Cancelled, /* 3 - terminal state, counts as processed */\n Grace, /* 4 - proceeds to ready/defeated */\n Ready, /* 5 - can be processed */\n Processed, /* 6 - terminal state */\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\n }\n\n // MODIFIERS\n\n modifier baalOnly() {\n require(_msgSender() == avatar, \"!baal\");\n _;\n }\n\n modifier baalOrAdminOnly() {\n require(_msgSender() == avatar || isAdmin(_msgSender()), \"!baal & !admin\"); /*check `shaman` is admin*/\n _;\n }\n\n modifier baalOrManagerOnly() {\n require(\n _msgSender() == avatar || isManager(_msgSender()),\n \"!baal & !manager\"\n ); /*check `shaman` is manager*/\n _;\n }\n\n modifier baalOrGovernorOnly() {\n require(\n _msgSender() == avatar || isGovernor(_msgSender()),\n \"!baal & !governor\"\n ); /*check `shaman` is governor*/\n _;\n }\n\n // EVENTS\n event SetupComplete(\n bool lootPaused,\n bool sharesPaused,\n uint32 gracePeriod,\n uint32 votingPeriod,\n uint256 proposalOffering,\n uint256 quorumPercent,\n uint256 sponsorThreshold,\n uint256 minRetentionPercent,\n string name,\n string symbol,\n uint256 totalShares,\n uint256 totalLoot\n ); /*emits after Baal summoning*/\n event SubmitProposal(\n uint256 indexed proposal,\n bytes32 indexed proposalDataHash,\n uint256 votingPeriod,\n bytes proposalData,\n uint256 expiration,\n uint256 baalGas,\n bool selfSponsor,\n uint256 timestamp,\n string details\n ); /*emits after proposal is submitted*/\n event SponsorProposal(\n address indexed member,\n uint256 indexed proposal,\n uint256 indexed votingStarts\n ); /*emits after member has sponsored proposal*/\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\n event SubmitVote(\n address indexed member,\n uint256 balance,\n uint256 indexed proposal,\n bool indexed approved\n ); /*emits after vote is submitted on proposal*/\n event ProcessProposal(\n uint256 indexed proposal,\n bool passed,\n bool actionFailed\n ); /*emits when proposal is processed & executed*/\n event Ragequit(\n address indexed member,\n address to,\n uint256 indexed lootToBurn,\n uint256 indexed sharesToBurn,\n address[] tokens\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 amount\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\n\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\n event GovernanceConfigSet(\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ); /*emits when gov config changes*/\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\n event LockManager(bool managerLock); /*emits when admin is locked*/\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\n /// @param _initializationParams Encoded setup information.\n function setUp(bytes memory _initializationParams)\n public\n override(FactoryFriendly)\n initializer\n nonReentrant\n {\n (\n address _lootToken, /*loot ERC20 token*/\n address _sharesToken, /*shares ERC20 token*/\n address _multisendLibrary, /*address of multisend library*/\n address _avatar, /*Safe contract address*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\n ) = abi.decode(\n _initializationParams,\n (address, address, address, address, address, bytes)\n );\n\n require(\n _multisendLibrary != address(0) &&\n _avatar != address(0),\n \"0 addr used\"\n );\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\n\n versionRecipient = \"2.2.5+opengsn.payablewithbaal.irelayrecipient\";\n __Ownable_init();\n __ReentrancyGuard_init();\n __EIP712_init(\"Vote\", \"4\");\n transferOwnership(_avatar);\n\n // Set the Gnosis safe address\n avatar = _avatar;\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\n\n // Set trusted forwarder\n _setTrustedForwarder(_forwarder);\n\n lootToken = IBaalToken(_lootToken);\n sharesToken = IBaalToken(_sharesToken);\n\n /*Set address of Gnosis multisend library to use for all execution*/\n multisendLibrary = _multisendLibrary;\n\n // Execute all setups including but not limited to\n // * mint shares\n // * convert shares to loot\n // * set shamans\n // * set admin configurations\n require(\n exec(\n multisendLibrary,\n 0,\n _initializationMultisendData,\n Enum.Operation.DelegateCall\n ),\n \"call failure setup\"\n );\n\n emit SetupComplete(\n lootToken.paused(),\n sharesToken.paused(),\n gracePeriod,\n votingPeriod,\n proposalOffering,\n quorumPercent,\n sponsorThreshold,\n minRetentionPercent,\n sharesToken.name(),\n sharesToken.symbol(),\n totalShares(),\n totalLoot()\n );\n\n }\n\n /*****************\n PROPOSAL FUNCTIONS\n *****************/\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\n /// @param proposalData Multisend encoded transactions or proposal data\n /// @param details Context for proposal.\n /// @return proposal Count for submitted proposal.\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable nonReentrant returns (uint256) {\n require(\n expiration == 0 ||\n expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n require(baalGas <= 20000000, \"baalGas to high\"); /* gwei 2/3 eth block limit */\n\n bool selfSponsor = false; /*plant sponsor flag*/\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\n } else {\n require(msg.value == proposalOffering, \"Baal requires an offering\"); /*Optional anti-spam gas token tribute*/\n (bool _success, ) = target.call{value: msg.value}(\"\"); /*Send ETH to sink*/\n require(_success, \"could not send\");\n }\n\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\n\n proposalCount++; /*increment proposal counter*/\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\n proposalCount,\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\n selfSponsor\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\n : 0, /* graceEnds */\n expiration,\n baalGas,\n 0, /* yes votes */\n 0, /* no votes */\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\n selfSponsor ? _msgSender() : address(0),\n proposalDataHash\n );\n\n if (selfSponsor) {\n latestSponsoredProposalId = proposalCount;\n }\n\n emit SubmitProposal(\n proposalCount,\n proposalDataHash,\n votingPeriod,\n proposalData,\n expiration,\n baalGas,\n selfSponsor,\n block.timestamp,\n details\n ); /*emit event reflecting proposal submission*/\n\n return proposalCount;\n }\n\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\n /// @param id Number of proposal in `proposals` mapping to sponsor.\n function sponsorProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \"!sponsor\"); /*check 'votes > threshold - required to sponsor proposal*/\n require(state(id) == ProposalState.Submitted, \"!submitted\");\n require(\n prop.expiration == 0 ||\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n\n prop.votingStarts = uint32(block.timestamp);\n\n unchecked {\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\n prop.graceEnds =\n uint32(block.timestamp) +\n votingPeriod +\n gracePeriod;\n }\n\n prop.prevProposalId = latestSponsoredProposalId;\n prop.sponsor = _msgSender();\n // snapshot both total supply and total shares\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\n latestSponsoredProposalId = id;\n\n emit SponsorProposal(_msgSender(), id, block.timestamp);\n }\n\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function submitVote(uint32 id, bool approved) external nonReentrant {\n _submitVote(_msgSender(), id, approved);\n }\n\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\n /// @param voter Address of member who submitted vote.\n /// @param expiry Expiration of signature.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n /// @param v v in signature\n /// @param r r in signature\n /// @param s s in signature\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external nonReentrant {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n require(nonce == votingNonces[voter], \"!nonce\");\n\n /*calculate EIP-712 struct hash*/\n bytes32 structHash = keccak256(\n abi.encode(\n VOTE_TYPEHASH,\n keccak256(abi.encodePacked(sharesToken.name())),\n voter,\n expiry,\n nonce,\n id,\n approved\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n\n require(signer == voter, \"invalid signature\");\n require(signer != address(0), \"!signer\");\n votingNonces[voter] += 1;\n\n _submitVote(signer, id, approved);\n }\n\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\n /// @param voter Address of voter\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function _submitVote(\n address voter,\n uint32 id,\n bool approved\n ) internal {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n require(state(id) == ProposalState.Voting, \"!voting\");\n\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\n\n require(balance > 0, \"!member\"); /* check that user has shares*/\n require(!memberVoted[voter][id], \"voted\"); /*check vote not already cast*/\n\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\n\n // get high water mark on all votes\n uint256 _totalSupply = totalSupply();\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\n }\n\n unchecked {\n if (approved) {\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\n prop.yesVotes += balance; \n } else {\n /*otherwise, cast delegated balance `noVotes` to proposal*/\n prop.noVotes += balance;\n }\n }\n\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\n }\n\n /// @notice Process `proposal` & execute internal functions.\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n function processProposal(uint32 id, bytes calldata proposalData)\n external\n nonReentrant\n {\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\n\n require(prop.sponsor != address(0), \"!sponsor\"); /*check proposal has been sponsored*/\n require(state(id) == ProposalState.Ready, \"!ready\"); /* check proposal is Ready to process */\n\n ProposalState prevProposalState = state(prop.prevProposalId);\n require(\n prevProposalState == ProposalState.Processed ||\n prevProposalState == ProposalState.Cancelled ||\n prevProposalState == ProposalState.Defeated ||\n prevProposalState == ProposalState.Unborn,\n \"prev!processed\"\n );\n\n // check that the proposalData matches the stored hash\n require(\n hashOperation(proposalData) == prop.proposalDataHash,\n \"incorrect calldata\"\n );\n\n require(\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\n \"not enough gas\"\n );\n\n prop.status[1] = true; /*Set processed flag to true*/\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\n\n // Make proposal fail if after expiration\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\n okToExecute = false;\n\n // Make proposal fail if it didn't pass quorum\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\n okToExecute = false;\n\n // Make proposal fail if the minRetentionPercent is exceeded\n if (\n okToExecute &&\n (totalSupply()) <\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\n ) {\n okToExecute = false;\n }\n\n /*check if `proposal` approved by simple majority of members*/\n if (okToExecute) {\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\n bool success = processActionProposal(proposalData); /*execute 'action'*/\n if (!success) {\n prop.status[3] = true;\n }\n }\n\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\n }\n\n /// @notice Internal function to process 'action'[0] proposal.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n /// @return success Success or failure of execution\n function processActionProposal(bytes memory proposalData)\n private\n returns (bool success)\n {\n success = exec(\n multisendLibrary,\n 0,\n proposalData,\n Enum.Operation.DelegateCall\n );\n }\n\n /// @notice Cancel proposal prior to execution\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n function cancelProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id];\n require(state(id) == ProposalState.Voting, \"!voting\");\n require(\n _msgSender() == prop.sponsor ||\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\n sponsorThreshold ||\n isGovernor(_msgSender()),\n \"!cancellable\"\n );\n prop.status[0] = true;\n emit CancelProposal(id);\n }\n\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\n /// proposal or by a delegated signer on the Safe\n /// @param _to address to call\n /// @param _value value to include in wei\n /// @param _data arbitrary transaction data\n function executeAsBaal(\n address _to,\n uint256 _value,\n bytes calldata _data\n ) external baalOnly {\n (bool success, ) = _to.call{value: _value}(_data);\n require(success, \"call failure execute\");\n }\n\n // ****************\n // MEMBER FUNCTIONS\n // ****************\n\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] calldata tokens\n ) external nonReentrant {\n for (uint256 i = 1; i < tokens.length; i++) {\n require(tokens[i] > tokens[i - 1], \"!order\");\n }\n\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\n }\n\n /// @notice Internal execution of rage quite\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function _ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] memory tokens\n ) internal {\n uint256 _totalSupply = totalSupply();\n\n if (lootToBurn != 0) {\n /*gas optimization*/\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\n }\n\n if (sharesToBurn != 0) {\n /*gas optimization*/\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\n }\n\n for (uint256 i = 0; i < tokens.length; i++) {\n uint256 balance;\n if(tokens[i] == ETH) {\n balance = address(target).balance;\n } else {\n (, bytes memory balanceData) = tokens[i].staticcall(\n abi.encodeWithSelector(0x70a08231, address(target))\n ); /*get Baal token balances - 'balanceOf(address)'*/\n balance = abi.decode(balanceData, (uint256));\n }\n\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\n _totalSupply; /*calculate 'fair shair' claims*/\n\n if (amountToRagequit != 0) {\n /*gas optimization to allow higher maximum token limit*/\n tokens[i] == ETH\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\n }\n }\n\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\n }\n\n /*******************\n GUILD MGMT FUNCTIONS\n *******************/\n /// @notice Baal-only function to set shaman status.\n /// @param _shamans Addresses of shaman contracts\n /// @param _permissions Permission level of each shaman in _shamans\n function setShamans(\n address[] calldata _shamans,\n uint256[] calldata _permissions\n ) external baalOnly {\n require(_shamans.length == _permissions.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < _shamans.length; i++) {\n uint256 permission = _permissions[i];\n if (adminLock)\n require(\n permission != 1 &&\n permission != 3 &&\n permission != 5 &&\n permission != 7,\n \"admin lock\"\n );\n if (managerLock)\n require(\n permission != 2 &&\n permission != 3 &&\n permission != 6 &&\n permission != 7,\n \"manager lock\"\n );\n if (governorLock)\n require(\n permission != 4 &&\n permission != 5 &&\n permission != 6 &&\n permission != 7,\n \"governor lock\"\n );\n shamans[_shamans[i]] = permission;\n emit ShamanSet(_shamans[i], permission);\n }\n }\n\n /// @notice Lock admin so setShamans cannot be called with admin changes\n function lockAdmin() external baalOnly {\n adminLock = true;\n\n emit LockAdmin(adminLock);\n }\n\n /// @notice Lock manager so setShamans cannot be called with manager changes\n function lockManager() external baalOnly {\n managerLock = true;\n\n emit LockManager(managerLock);\n }\n\n /// @notice Lock governor so setShamans cannot be called with governor changes\n function lockGovernor() external baalOnly {\n governorLock = true;\n\n emit LockGovernor(governorLock);\n }\n\n // ****************\n // SHAMAN FUNCTIONS\n // ****************\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\n /// @param pauseShares Turn share transfers on or off\n /// @param pauseLoot Turn loot transfers on or off\n function setAdminConfig(bool pauseShares, bool pauseLoot)\n external\n baalOrAdminOnly\n {\n\n if(pauseShares && !sharesToken.paused()){\n sharesToken.pause();\n emit SharesPaused(true);\n } else if(!pauseShares && sharesToken.paused()){\n sharesToken.unpause();\n emit SharesPaused(false);\n }\n\n if(pauseLoot && !lootToken.paused()){\n lootToken.pause();\n emit LootPaused(true);\n } else if(!pauseLoot && lootToken.paused()){\n lootToken.unpause();\n emit LootPaused(false);\n }\n }\n\n /// @notice Baal-or-manager-only function to mint shares.\n /// @param to Array of addresses to receive shares\n /// @param amount Array of amounts to mint\n function mintShares(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `shares`.\n /// @param to Address to receive shares\n /// @param shares Amount to mint\n function _mintShares(address to, uint256 shares) private {\n sharesToken.mint(to, shares);\n }\n\n /// @notice Baal-or-manager-only function to burn shares.\n /// @param from Array of addresses to lose shares\n /// @param amount Array of amounts to burn\n function burnShares(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `shares`.\n /// @param from Address to lose shares\n /// @param shares Amount to burn\n function _burnShares(address from, uint256 shares) private {\n sharesToken.burn(from, shares);\n }\n\n /// @notice Baal-or-manager-only function to mint loot.\n /// @param to Array of addresses to mint loot\n /// @param amount Array of amounts to mint\n function mintLoot(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `loot`.\n /// @param to Address to mint loot\n /// @param loot Amount to mint\n function _mintLoot(address to, uint256 loot) private {\n lootToken.mint(to, loot);\n }\n\n /// @notice Baal-or-manager-only function to burn loot.\n /// @param from Array of addresses to lose loot\n /// @param amount Array of amounts to burn\n function burnLoot(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `loot`.\n /// @param from Address to lose loot\n /// @param loot Amount to burn\n function _burnLoot(address from, uint256 loot) private {\n lootToken.burn(from, loot);\n }\n\n /// @notice Baal-or-governance-only function to change periods.\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\n function setGovernanceConfig(bytes memory _governanceConfig)\n external\n baalOrGovernorOnly\n {\n (\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ) = abi.decode(\n _governanceConfig,\n (uint32, uint32, uint256, uint256, uint256, uint256)\n );\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\n\n // on initialization of governance config, there is no shares token\n // skip this check on initialization of governance config.\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\n }\n\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\n proposalOffering = newOffering; /*set new proposal offering amount */\n quorumPercent = quorum;\n sponsorThreshold = sponsor;\n minRetentionPercent = minRetention;\n\n emit GovernanceConfigSet(\n voting,\n grace,\n newOffering,\n quorum,\n sponsor,\n minRetention\n );\n }\n\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\n /// @param _trustedForwarderAddress Trusted forwarder's address\n function setTrustedForwarder(address _trustedForwarderAddress)\n external\n baalOrGovernorOnly\n {\n _setTrustedForwarder(_trustedForwarderAddress);\n emit SetTrustedForwarder(_trustedForwarderAddress);\n }\n\n /***************\n GETTER FUNCTIONS\n ***************/\n /// @notice State helper to determine proposal state\n /// @param id Number of proposal in proposals\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n /// \\-> Cancelled \\-> Defeated\n function state(uint32 id) public view returns (ProposalState) {\n Proposal memory prop = proposals[id];\n if (prop.id == 0) {\n /*Uninitialized state*/\n return ProposalState.Unborn;\n } else if (\n prop.status[0] /* cancelled */\n ) {\n return ProposalState.Cancelled;\n } else if (\n prop.votingStarts == 0 /*Voting has not started*/\n ) {\n return ProposalState.Submitted;\n } else if (\n block.timestamp <= prop.votingEnds /*Voting in progress*/\n ) {\n return ProposalState.Voting;\n } else if (\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\n ) {\n return ProposalState.Grace;\n } else if (\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\n ) {\n return ProposalState.Defeated;\n } else if (\n prop.status[1] /* processed */\n ) {\n return ProposalState.Processed;\n }\n /* Proposal is ready to be processed*/\n else {\n return ProposalState.Ready;\n }\n }\n\n /// @notice Helper to get recorded proposal flags\n /// @param id Number of proposal in proposals\n /// @return [cancelled, processed, passed, actionFailed]\n function getProposalStatus(uint32 id)\n external\n view\n returns (bool[4] memory)\n {\n return proposals[id].status;\n }\n\n /// @notice Helper to check if shaman permission contains admin capabilities\n /// @param shaman Address attempting to execute admin permissioned functions\n function isAdmin(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 1 ||\n permission == 3 ||\n permission == 5 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains manager capabilities\n /// @param shaman Address attempting to execute manager permissioned functions\n function isManager(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 2 ||\n permission == 3 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains governor capabilities\n /// @param shaman Address attempting to execute governor permissioned functions\n function isGovernor(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 4 ||\n permission == 5 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check total supply of child loot contract\n function totalLoot() public view returns (uint256) {\n return lootToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of child shares contract\n function totalShares() public view returns (uint256) {\n return sharesToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of loot and shares\n function totalSupply() public view returns (uint256) {\n return totalLoot() + totalShares();\n }\n\n /***************\n HELPER FUNCTIONS\n ***************/\n /// @notice Returns the keccak256 hash of calldata\n function hashOperation(bytes memory _transactions)\n public\n pure\n virtual\n returns (bytes32 hash)\n {\n return keccak256(abi.encode(_transactions));\n }\n\n /// @notice Provides 'safe' {transfer} for ETH.\n function _safeTransferETH(address to, uint256 amount) internal {\n // transfer eth from target\n (bool success, ) = execAndReturnData(\n to,\n amount,\n \"\",\n Enum.Operation.Call\n );\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\n function _safeTransfer(\n address token,\n address to,\n uint256 amount\n ) private {\n (bool success, bytes memory data) = execAndReturnData(\n token,\n 0,\n abi.encodeWithSelector(0xa9059cbb, to, amount),\n Enum.Operation.Call\n ); /*'transfer(address,uint)'*/\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"transfer failed\"\n ); /*checks success & allows non-conforming transfers*/\n }\n\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (address sender) {\n sender = BaseRelayRecipient._msgSender();\n }\n\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (bytes calldata) {\n return BaseRelayRecipient._msgData();\n }\n}\n" + }, + "contracts/BaalSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\";\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"./Baal.sol\";\n\ncontract BaalSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\n // when some of the init addresses are updated\n uint256 public addrsVersion;\n\n address payable public template; // fixed template for baal using eip-1167 proxy pattern\n\n // Template contract to use for new Gnosis safe proxies\n address public gnosisSingleton;\n\n // Library to use for EIP1271 compatability\n address public gnosisFallbackLibrary;\n\n // Library to use for all safe transaction executions\n address public gnosisMultisendLibrary;\n\n // template contract to clone for loot ERC20 token\n address public lootSingleton;\n\n // template contract to clone for shares ERC20 token\n address public sharesSingleton;\n\n // Proxy summoners\n //\n GnosisSafeProxyFactory gnosisSafeProxyFactory;\n ModuleProxyFactory moduleProxyFactory;\n\n event SetAddrsVersion(\n uint256 version\n );\n\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n\n event DaoReferral(\n bytes32 referrer,\n address daoAddress\n );\n\n event DeployBaalTokens(\n address lootToken, \n address sharesToken\n );\n\n event DeployBaalSafe(\n address baalSafe,\n address moduleAddr\n );\n\n function initialize() initializer public {\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n // must be called after deploy to set libraries\n function setAddrs(\n address payable _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) public onlyOwner {\n require(_lootSingleton != address(0), \"!lootSingleton\");\n require(_sharesSingleton != address(0), \"!sharesSingleton\");\n require(_gnosisSingleton != address(0), \"!gnosisSingleton\");\n require(_gnosisFallbackLibrary != address(0), '!gnosisFallbackLibrary');\n require(_gnosisMultisendLibrary != address(0), '!gnosisMultisendLibrary');\n require(_gnosisSafeProxyFactory != address(0), '!gnosisSafeProxyFactory');\n require(_moduleProxyFactory != address(0), '!moduleProxyFactory');\n\n template = _template;\n gnosisSingleton = _gnosisSingleton;\n gnosisFallbackLibrary = _gnosisFallbackLibrary;\n gnosisMultisendLibrary = _gnosisMultisendLibrary;\n gnosisSafeProxyFactory = GnosisSafeProxyFactory(_gnosisSafeProxyFactory);\n moduleProxyFactory = ModuleProxyFactory(_moduleProxyFactory);\n lootSingleton = _lootSingleton;\n sharesSingleton = _sharesSingleton;\n\n emit SetAddrsVersion(\n addrsVersion++\n );\n \n }\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n public\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n function summonBaal(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce\n ) external returns (address) {\n \n return\n _summonBaal(\n initializationParams,\n initializationActions,\n _saltNonce\n );\n }\n\n // Add a referrer to help keep track of where deploies are coming from\n function summonBaalFromReferrer(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address) {\n address daoAddress;\n\n daoAddress = _summonBaal(\n initializationParams,\n initializationActions,\n _saltNonce\n );\n\n emit DaoReferral(referrer, daoAddress);\n return daoAddress;\n }\n\n // deploy new share and loot contracts\n function deployTokens(string memory _name, string memory _symbol) \n public \n returns (address lootToken, address sharesToken) \n {\n lootToken = address(new ERC1967Proxy(\n lootSingleton,\n abi.encodeWithSelector(\n IBaalToken(lootSingleton).setUp.selector, \n string(abi.encodePacked(_name, \" LOOT\")), \n string(abi.encodePacked(_symbol, \"-LOOT\")))\n ));\n\n sharesToken = address(new ERC1967Proxy(\n sharesSingleton,\n abi.encodeWithSelector(\n IBaalToken(sharesSingleton).setUp.selector, \n _name, \n _symbol)\n ));\n\n emit DeployBaalTokens(lootToken, sharesToken);\n\n }\n\n // deploy a safe with module and single module signer setup\n function deployAndSetupSafe(address _moduleAddr)\n public\n returns (address)\n {\n // Deploy new safe but do not set it up yet\n GnosisSafe _safe = GnosisSafe(\n payable(\n gnosisSafeProxyFactory.createProxy(\n gnosisSingleton,\n bytes(\"\")\n )\n )\n );\n // Generate delegate calls so the safe calls enableModule on itself during setup\n bytes memory _enableBaal = abi.encodeWithSignature(\n \"enableModule(address)\",\n address(_moduleAddr)\n );\n bytes memory _enableBaalMultisend = abi.encodePacked(\n uint8(0),\n address(_safe),\n uint256(0),\n uint256(_enableBaal.length),\n bytes(_enableBaal)\n );\n\n bytes memory _multisendAction = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n _enableBaalMultisend\n );\n\n // Workaround for solidity dynamic memory array\n address[] memory _owners = new address[](1);\n _owners[0] = address(_moduleAddr);\n\n // Call setup on safe to enable our new module and set the module as the only signer\n _safe.setup(\n _owners,\n 1,\n gnosisMultisendLibrary,\n _multisendAction,\n gnosisFallbackLibrary,\n address(0),\n 0,\n payable(address(0))\n );\n\n emit DeployBaalSafe(address(_safe), address(_moduleAddr));\n\n return address(_safe);\n }\n\n // advanced summon baal with different configurations\n // name and symbol can be blank if bringing own baal tokens\n // zero address for either loot or shares token will summon new ones\n // if bringing own tokens the ownership must be transfered to the new DAO\n // zero address for Safe with summon and setup a new Safe\n // if bringing existing safe the new dao must be enabled as a module\n // todo: add a simple summon that just creates a dao with a single summoner\n function _summonBaal(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 _saltNonce\n ) internal returns (address) {\n uint256 existingAddrs; // 1 tokens, 2 safe, 3 both\n (\n string memory _name, /*_name Name for erc20 `shares` accounting, empty if token */\n string memory _symbol, /*_symbol Symbol for erc20 `shares` accounting, empty if token*/\n address _safeAddr, /*address of safe, 0 addr if new*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771), 0 addr if initially disabled*/\n address _lootToken, /*predeployed loot token, 0 addr if new*/\n address _sharesToken /*predeployed shares token, 0 addr if new*/\n ) = abi.decode(initializationParams, (string, string, address, address, address, address));\n\n Baal _baal = Baal(\n moduleProxyFactory.deployModule(\n template, \n abi.encodeWithSignature(\"avatar()\"), \n _saltNonce\n )\n );\n\n // if loot or shares are zero address new tokens are deployed\n // tokens need to be baalTokens\n if(_lootToken == address(0) || _sharesToken == address(0)){\n (_lootToken, _sharesToken) = deployTokens(_name, _symbol);\n // pause tokens by default and transfer to the DAO\n IBaalToken(_lootToken).pause();\n IBaalToken(_sharesToken).pause();\n IBaalToken(_lootToken).transferOwnership(address(_baal));\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\n } else {\n existingAddrs += 1;\n }\n\n // if zero address deploy a new safe\n // Needs to be a valid zodiac treasury\n if(_safeAddr == address(0)){\n _safeAddr = deployAndSetupSafe(address(_baal));\n } else {\n existingAddrs += 2;\n }\n\n bytes memory _initializationMultisendData = encodeMultisend(\n initializationActions,\n address(_baal)\n );\n bytes memory _initializer = abi.encode(\n _lootToken,\n _sharesToken,\n gnosisMultisendLibrary,\n _safeAddr,\n _forwarder,\n _initializationMultisendData\n );\n // can run the actions now because we have a baal\n _baal.setUp(_initializer);\n\n emit SummonBaal(\n address(_baal),\n address(_baal.lootToken()),\n address(_baal.sharesToken()),\n _safeAddr,\n _forwarder,\n existingAddrs\n );\n\n return (address(_baal));\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n onlyOwner\n override\n {}\n}\n" + }, + "contracts/interfaces/IAdminShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IAdminShaman {\n function isAdmin(address shaman) external view returns (bool);\n\n // Admin Only\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n}\n" + }, + "contracts/interfaces/IBaal.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaal {\n function lootToken() external view returns (address);\n function sharesToken() external view returns (address);\n function votingPeriod() external view returns (uint32);\n function gracePeriod() external view returns (uint32);\n function proposalCount() external view returns (uint32);\n function proposalOffering() external view returns (uint256);\n function quorumPercent() external view returns (uint256);\n function sponsorThreshold() external view returns (uint256);\n function minRetentionPercent() external view returns (uint256);\n function latestSponsoredProposalId() external view returns (uint32);\n\n function setUp(bytes memory initializationParams) external;\n function multisendLibrary() external view returns (address);\n // Module\n function avatar() external view returns (address);\n function target() external view returns (address);\n function setAvatar(address avatar) external;\n function setTarget(address avatar) external;\n // BaseRelayRecipient\n function trustedForwarder() external view returns (address);\n function setTrustedForwarder(address trustedForwarderAddress) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n function totalLoot() external view returns (uint256);\n function totalShares() external view returns (uint256);\n function totalSupply() external view returns (uint256);\n function lootPaused() external view returns (bool);\n function sharesPaused() external view returns (bool);\n \n function shamans(address shaman) external view returns (uint256);\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\n function isAdmin(address shaman) external view returns (bool);\n function isManager(address shaman) external view returns (bool);\n function isGovernor(address shaman) external view returns (bool);\n function lockAdmin() external;\n function lockManager() external;\n function lockGovernor() external;\n function adminLock() external view returns (bool);\n function managerLock() external view returns (bool);\n function governorLock() external view returns (bool);\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n function setGovernanceConfig(bytes memory governanceConfig) external;\n\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable returns (uint256);\n function sponsorProposal(uint32 id) external;\n function processProposal(uint32 id, bytes calldata proposalData) external;\n function cancelProposal(uint32 id) external;\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\n function submitVote(uint32 id, bool approved) external;\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\n\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\n}\n" + }, + "contracts/interfaces/IBaalAndVaultSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalAndVaultSummoner {\n\n function _baalSummoner() external view returns (address);\n function summonBaalAndVault(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 saltNonce,\n bytes32 referrer,\n string memory name\n ) external returns (address _daoAddress, address _vaultAddress);\n}\n" + }, + "contracts/interfaces/IBaalSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalSummoner {\n event AdminChanged(address previousAdmin, address newAdmin);\n event BeaconUpgraded(address indexed beacon);\n event DaoReferral(bytes32 referrer, address daoAddress);\n event DeployBaalSafe(address baalSafe, address moduleAddr);\n event DeployBaalTokens(address lootToken, address sharesToken);\n event Initialized(uint8 version);\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event SetAddrsVersion(uint256 version);\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n event Upgraded(address indexed implementation);\n\n function setAddrs(\n address _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) external;\n\n function initialize() external;\n\n function transferOwnership(address newOwner) external;\n function upgradeTo(address newImplementation) external;\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\n function renounceOwnership() external;\n\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\n external\n returns (address);\n function summonBaalFromReferrer(\n bytes memory initializationParams,\n bytes[] memory initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address);\n\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\n function deployTokens(string memory _name, string memory _symbol)\n external\n returns (address lootToken, address sharesToken);\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend);\n function addrsVersion() external view returns (uint256);\n function gnosisFallbackLibrary() external view returns (address);\n function gnosisMultisendLibrary() external view returns (address);\n function gnosisSingleton() external view returns (address);\n function lootSingleton() external view returns (address);\n function sharesSingleton() external view returns (address);\n function owner() external view returns (address);\n function proxiableUUID() external view returns (bytes32);\n function template() external view returns (address);\n}\n" + }, + "contracts/interfaces/IBaalToken.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalToken {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function setUp(string memory _name, string memory _symbol) external;\n\n function mint(address recipient, uint256 amount) external;\n\n function burn(address account, uint256 amount) external;\n\n function pause() external;\n\n function unpause() external;\n\n function paused() external view returns (bool);\n \n function transferOwnership(address newOwner) external;\n\n function owner() external view returns (address);\n\n function balanceOf(address account) external view returns (uint256);\n\n function totalSupply() external view returns (uint256);\n\n function snapshot() external returns(uint256);\n\n function getCurrentSnapshotId() external returns(uint256);\n\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\n\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\n\n // below is shares token specific\n struct Checkpoint {\n uint32 fromTimePoint;\n uint256 votes;\n }\n\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\n\n function numCheckpoints(address) external view returns (uint256);\n\n function getCheckpoint(address, uint256)\n external\n view\n returns (Checkpoint memory);\n\n function getVotes(address account) external view returns (uint256);\n\n function delegates(address account) external view returns (address);\n\n function delegationNonces(address account) external view returns (uint256);\n\n function delegate(address delegatee) external;\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "contracts/interfaces/IGovernorShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IGovernorShaman {\n function isGovernor(address shaman) external view returns (bool);\n // Governor Only\n function setGovernanceConfig(bytes memory _governanceConfig) external;\n}\n" + }, + "contracts/interfaces/IManagerShaman.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IManagerShaman {\n\n function isManager(address shaman) external view returns (bool);\n\n // Manager Only\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n\n}\n" + }, + "contracts/interfaces/IPoster.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IPoster {\n function post(string calldata content, string calldata tag) external;\n}\n" + }, + "contracts/utils/DelegationEIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4Delegation}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract DelegationEIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME_DELEGATION;\n bytes32 private _HASHED_VERSION_DELEGATION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained_delegation(name, version);\n }\n\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME_DELEGATION = hashedName;\n _HASHED_VERSION_DELEGATION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\n }\n\n function _buildDomainSeparatorDelegation(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_NAME_DELEGATION;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_VERSION_DELEGATION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/d833871936d16a85338aeeebf4887b62.json b/deployments/sepolia/solcInputs/d833871936d16a85338aeeebf4887b62.json new file mode 100644 index 0000000..285fb33 --- /dev/null +++ b/deployments/sepolia/solcInputs/d833871936d16a85338aeeebf4887b62.json @@ -0,0 +1,302 @@ +{ + "language": "Solidity", + "sources": { + "@gnosis.pm/safe-contracts/contracts/base/Executor.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\n\n/// @title Executor - A contract that can execute transactions\n/// @author Richard Meissner - \ncontract Executor {\n function execute(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 txGas\n ) internal returns (bool success) {\n if (operation == Enum.Operation.DelegateCall) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n }\n } else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/FallbackManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract FallbackManager is SelfAuthorized {\n event ChangedFallbackHandler(address handler);\n\n // keccak256(\"fallback_manager.handler.address\")\n bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT = 0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5;\n\n function internalSetFallbackHandler(address handler) internal {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, handler)\n }\n }\n\n /// @dev Allows to add a contract to handle fallback calls.\n /// Only fallback calls without value and with data will be forwarded.\n /// This can only be done via a Safe transaction.\n /// @param handler contract to handle fallbacks calls.\n function setFallbackHandler(address handler) public authorized {\n internalSetFallbackHandler(handler);\n emit ChangedFallbackHandler(handler);\n }\n\n // solhint-disable-next-line payable-fallback,no-complex-fallback\n fallback() external {\n bytes32 slot = FALLBACK_HANDLER_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let handler := sload(slot)\n if iszero(handler) {\n return(0, 0)\n }\n calldatacopy(0, 0, calldatasize())\n // The msg.sender address is shifted to the left by 12 bytes to remove the padding\n // Then the address without padding is stored right after the calldata\n mstore(calldatasize(), shl(96, caller()))\n // Add 20 bytes for the address appended add the end\n let success := call(gas(), handler, 0, 0, add(calldatasize(), 20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if iszero(success) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\n\ninterface Guard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n\n/// @title Fallback Manager - A contract that manages fallback calls made to this contract\n/// @author Richard Meissner - \ncontract GuardManager is SelfAuthorized {\n event ChangedGuard(address guard);\n // keccak256(\"guard_manager.guard.address\")\n bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8;\n\n /// @dev Set a guard that checks transactions before execution\n /// @param guard The address of the guard to be used or the 0 address to disable the guard\n function setGuard(address guard) external authorized {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, guard)\n }\n emit ChangedGuard(guard);\n }\n\n function getGuard() internal view returns (address guard) {\n bytes32 slot = GUARD_STORAGE_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n guard := sload(slot)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/ModuleManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/Enum.sol\";\nimport \"../common/SelfAuthorized.sol\";\nimport \"./Executor.sol\";\n\n/// @title Module Manager - A contract that manages modules that can execute transactions via this contract\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract ModuleManager is SelfAuthorized, Executor {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n address internal constant SENTINEL_MODULES = address(0x1);\n\n mapping(address => address) internal modules;\n\n function setupModules(address to, bytes memory data) internal {\n require(modules[SENTINEL_MODULES] == address(0), \"GS100\");\n modules[SENTINEL_MODULES] = SENTINEL_MODULES;\n if (to != address(0))\n // Setup has to complete successfully or transaction fails.\n require(execute(to, 0, data, Enum.Operation.DelegateCall, gasleft()), \"GS000\");\n }\n\n /// @dev Allows to add a module to the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Enables the module `module` for the Safe.\n /// @param module Module to be whitelisted.\n function enableModule(address module) public authorized {\n // Module address cannot be null or sentinel.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n // Module cannot be added twice.\n require(modules[module] == address(0), \"GS102\");\n modules[module] = modules[SENTINEL_MODULES];\n modules[SENTINEL_MODULES] = module;\n emit EnabledModule(module);\n }\n\n /// @dev Allows to remove a module from the whitelist.\n /// This can only be done via a Safe transaction.\n /// @notice Disables the module `module` for the Safe.\n /// @param prevModule Module that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) public authorized {\n // Validate module address and check that it corresponds to module index.\n require(module != address(0) && module != SENTINEL_MODULES, \"GS101\");\n require(modules[prevModule] == module, \"GS103\");\n modules[prevModule] = modules[module];\n modules[module] = address(0);\n emit DisabledModule(module);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public virtual returns (bool success) {\n // Only whitelisted modules are allowed.\n require(msg.sender != SENTINEL_MODULES && modules[msg.sender] != address(0), \"GS104\");\n // Execute transaction without further confirmations.\n success = execute(to, value, data, operation, gasleft());\n if (success) emit ExecutionFromModuleSuccess(msg.sender);\n else emit ExecutionFromModuleFailure(msg.sender);\n }\n\n /// @dev Allows a Module to execute a Safe transaction without any further confirmations and return data\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) public returns (bool success, bytes memory returnData) {\n success = execTransactionFromModule(to, value, data, operation);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // Load free memory location\n let ptr := mload(0x40)\n // We allocate memory for the return data by setting the free memory location to\n // current free memory location + data size + 32 bytes for data size value\n mstore(0x40, add(ptr, add(returndatasize(), 0x20)))\n // Store the size\n mstore(ptr, returndatasize())\n // Store the data\n returndatacopy(add(ptr, 0x20), 0, returndatasize())\n // Point the return data to the correct memory location\n returnData := ptr\n }\n }\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) public view returns (bool) {\n return SENTINEL_MODULES != module && modules[module] != address(0);\n }\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize) external view returns (address[] memory array, address next) {\n // Init array with max page size\n array = new address[](pageSize);\n\n // Populate return array\n uint256 moduleCount = 0;\n address currentModule = modules[start];\n while (currentModule != address(0x0) && currentModule != SENTINEL_MODULES && moduleCount < pageSize) {\n array[moduleCount] = currentModule;\n currentModule = modules[currentModule];\n moduleCount++;\n }\n next = currentModule;\n // Set correct size of returned array\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(array, moduleCount)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/base/OwnerManager.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"../common/SelfAuthorized.sol\";\n\n/// @title OwnerManager - Manages a set of owners and a threshold to perform actions.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract OwnerManager is SelfAuthorized {\n event AddedOwner(address owner);\n event RemovedOwner(address owner);\n event ChangedThreshold(uint256 threshold);\n\n address internal constant SENTINEL_OWNERS = address(0x1);\n\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n function setupOwners(address[] memory _owners, uint256 _threshold) internal {\n // Threshold can only be 0 at initialization.\n // Check ensures that setup function can only be called once.\n require(threshold == 0, \"GS200\");\n // Validate that threshold is smaller than number of added owners.\n require(_threshold <= _owners.length, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n // Initializing Safe owners.\n address currentOwner = SENTINEL_OWNERS;\n for (uint256 i = 0; i < _owners.length; i++) {\n // Owner address cannot be null.\n address owner = _owners[i];\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this) && currentOwner != owner, \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[currentOwner] = owner;\n currentOwner = owner;\n }\n owners[currentOwner] = SENTINEL_OWNERS;\n ownerCount = _owners.length;\n threshold = _threshold;\n }\n\n /// @dev Allows to add a new owner to the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.\n /// @param owner New owner address.\n /// @param _threshold New threshold.\n function addOwnerWithThreshold(address owner, uint256 _threshold) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(owner != address(0) && owner != SENTINEL_OWNERS && owner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[owner] == address(0), \"GS204\");\n owners[owner] = owners[SENTINEL_OWNERS];\n owners[SENTINEL_OWNERS] = owner;\n ownerCount++;\n emit AddedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to remove an owner from the Safe and update the threshold at the same time.\n /// This can only be done via a Safe transaction.\n /// @notice Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.\n /// @param prevOwner Owner that pointed to the owner to be removed in the linked list\n /// @param owner Owner address to be removed.\n /// @param _threshold New threshold.\n function removeOwner(\n address prevOwner,\n address owner,\n uint256 _threshold\n ) public authorized {\n // Only allow to remove an owner, if threshold can still be reached.\n require(ownerCount - 1 >= _threshold, \"GS201\");\n // Validate owner address and check that it corresponds to owner index.\n require(owner != address(0) && owner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == owner, \"GS205\");\n owners[prevOwner] = owners[owner];\n owners[owner] = address(0);\n ownerCount--;\n emit RemovedOwner(owner);\n // Change threshold if threshold was changed.\n if (threshold != _threshold) changeThreshold(_threshold);\n }\n\n /// @dev Allows to swap/replace an owner from the Safe with another address.\n /// This can only be done via a Safe transaction.\n /// @notice Replaces the owner `oldOwner` in the Safe with `newOwner`.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n function swapOwner(\n address prevOwner,\n address oldOwner,\n address newOwner\n ) public authorized {\n // Owner address cannot be null, the sentinel or the Safe itself.\n require(newOwner != address(0) && newOwner != SENTINEL_OWNERS && newOwner != address(this), \"GS203\");\n // No duplicate owners allowed.\n require(owners[newOwner] == address(0), \"GS204\");\n // Validate oldOwner address and check that it corresponds to owner index.\n require(oldOwner != address(0) && oldOwner != SENTINEL_OWNERS, \"GS203\");\n require(owners[prevOwner] == oldOwner, \"GS205\");\n owners[newOwner] = owners[oldOwner];\n owners[prevOwner] = newOwner;\n owners[oldOwner] = address(0);\n emit RemovedOwner(oldOwner);\n emit AddedOwner(newOwner);\n }\n\n /// @dev Allows to update the number of required confirmations by Safe owners.\n /// This can only be done via a Safe transaction.\n /// @notice Changes the threshold of the Safe to `_threshold`.\n /// @param _threshold New threshold.\n function changeThreshold(uint256 _threshold) public authorized {\n // Validate that threshold is smaller than number of owners.\n require(_threshold <= ownerCount, \"GS201\");\n // There has to be at least one Safe owner.\n require(_threshold >= 1, \"GS202\");\n threshold = _threshold;\n emit ChangedThreshold(threshold);\n }\n\n function getThreshold() public view returns (uint256) {\n return threshold;\n }\n\n function isOwner(address owner) public view returns (bool) {\n return owner != SENTINEL_OWNERS && owners[owner] != address(0);\n }\n\n /// @dev Returns array of owners.\n /// @return Array of Safe owners.\n function getOwners() public view returns (address[] memory) {\n address[] memory array = new address[](ownerCount);\n\n // populate return array\n uint256 index = 0;\n address currentOwner = owners[SENTINEL_OWNERS];\n while (currentOwner != SENTINEL_OWNERS) {\n array[index] = currentOwner;\n currentOwner = owners[currentOwner];\n index++;\n }\n return array;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Enum.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Enum - Collection of enums\n/// @author Richard Meissner - \ncontract Enum {\n enum Operation {Call, DelegateCall}\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title EtherPaymentFallback - A contract that has a fallback to accept ether payments\n/// @author Richard Meissner - \ncontract EtherPaymentFallback {\n event SafeReceived(address indexed sender, uint256 value);\n\n /// @dev Fallback function accepts Ether transactions.\n receive() external payable {\n emit SafeReceived(msg.sender, msg.value);\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SecuredTokenTransfer.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SecuredTokenTransfer - Secure token transfer\n/// @author Richard Meissner - \ncontract SecuredTokenTransfer {\n /// @dev Transfers a token and returns if it was a success\n /// @param token Token that should be transferred\n /// @param receiver Receiver to whom the token should be transferred\n /// @param amount The amount of tokens that should be transferred\n function transferToken(\n address token,\n address receiver,\n uint256 amount\n ) internal returns (bool transferred) {\n // 0xa9059cbb - keccack(\"transfer(address,uint256)\")\n bytes memory data = abi.encodeWithSelector(0xa9059cbb, receiver, amount);\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // We write the return value to scratch space.\n // See https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html#layout-in-memory\n let success := call(sub(gas(), 10000), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n switch returndatasize()\n case 0 {\n transferred := success\n }\n case 0x20 {\n transferred := iszero(or(iszero(success), iszero(mload(0))))\n }\n default {\n transferred := 0\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SelfAuthorized.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SelfAuthorized - authorizes current contract to perform actions\n/// @author Richard Meissner - \ncontract SelfAuthorized {\n function requireSelfCall() private view {\n require(msg.sender == address(this), \"GS031\");\n }\n\n modifier authorized() {\n // This is a function call as it minimized the bytecode size\n requireSelfCall();\n _;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/SignatureDecoder.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title SignatureDecoder - Decodes signatures that a encoded as bytes\n/// @author Richard Meissner - \ncontract SignatureDecoder {\n /// @dev divides bytes signature into `uint8 v, bytes32 r, bytes32 s`.\n /// @notice Make sure to peform a bounds check for @param pos, to avoid out of bounds access on @param signatures\n /// @param pos which signature to read. A prior bounds check of this parameter should be performed, to avoid out of bounds access\n /// @param signatures concatenated rsv signatures\n function signatureSplit(bytes memory signatures, uint256 pos)\n internal\n pure\n returns (\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n {\n // The signature format is a compact form of:\n // {bytes32 r}{bytes32 s}{uint8 v}\n // Compact means, uint8 is not padded to 32 bytes.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let signaturePos := mul(0x41, pos)\n r := mload(add(signatures, add(signaturePos, 0x20)))\n s := mload(add(signatures, add(signaturePos, 0x40)))\n // Here we are loading the last 32 bytes, including 31 bytes\n // of 's'. There is no 'mload8' to do this.\n //\n // 'byte' is not working due to the Solidity parser, so lets\n // use the second best option, 'and'\n v := and(mload(add(signatures, add(signaturePos, 0x41))), 0xff)\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/Singleton.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Singleton - Base for singleton contracts (should always be first super contract)\n/// This contract is tightly coupled to our proxy contract (see `proxies/GnosisSafeProxy.sol`)\n/// @author Richard Meissner - \ncontract Singleton {\n // singleton always needs to be first declared variable, to ensure that it is at the same location as in the Proxy contract.\n // It should also always be ensured that the address is stored alone (uses a full word)\n address private singleton;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title StorageAccessible - generic base contract that allows callers to access all internal storage.\n/// @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\ncontract StorageAccessible {\n /**\n * @dev Reads `length` bytes of storage in the currents contract\n * @param offset - the offset in the current contract's storage in words to start reading from\n * @param length - the number of words (32 bytes) of data to read\n * @return the bytes that were read.\n */\n function getStorageAt(uint256 offset, uint256 length) public view returns (bytes memory) {\n bytes memory result = new bytes(length * 32);\n for (uint256 index = 0; index < length; index++) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let word := sload(add(offset, index))\n mstore(add(add(result, 0x20), mul(index, 0x20)), word)\n }\n }\n return result;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static).\n *\n * This method reverts with data equal to `abi.encode(bool(success), bytes(response))`.\n * Specifically, the `returndata` after a call to this method will be:\n * `success:bool || response.length:uint256 || response:bytes`.\n *\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulateAndRevert(address targetContract, bytes memory calldataPayload) external {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let success := delegatecall(gas(), targetContract, add(calldataPayload, 0x20), mload(calldataPayload), 0, 0)\n\n mstore(0x00, success)\n mstore(0x20, returndatasize())\n returndatacopy(0x40, 0, returndatasize())\n revert(0, add(returndatasize(), 0x40))\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/GnosisSafeStorage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title GnosisSafeStorage - Storage layout of the Safe contracts to be used in libraries\n/// @author Richard Meissner - \ncontract GnosisSafeStorage {\n // From /common/Singleton.sol\n address internal singleton;\n // From /common/ModuleManager.sol\n mapping(address => address) internal modules;\n // From /common/OwnerManager.sol\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n // From /GnosisSafe.sol\n bytes32 internal nonce;\n bytes32 internal domainSeparator;\n mapping(bytes32 => uint256) internal signedMessages;\n mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeStorage.sol\";\nimport \"../../GnosisSafe.sol\";\n\n/// @title SignMessageLib - Allows to set an entry in the signedMessages\n/// @author Richard Meissner - \ncontract SignMessageLib is GnosisSafeStorage {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n event SignMsg(bytes32 indexed msgHash);\n\n /// @dev Marks a message as signed, so that it can be used with EIP-1271\n /// @notice Marks a message (`_data`) as signed.\n /// @param _data Arbitrary length data that should be marked as signed on the behalf of address(this)\n function signMessage(bytes calldata _data) external {\n bytes32 msgHash = getMessageHash(_data);\n signedMessages[msgHash] = 1;\n emit SignMsg(msgHash);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return\n keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), GnosisSafe(payable(address(this))).domainSeparator(), safeMessageHash));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/external/GnosisSafeMath.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title GnosisSafeMath\n * @dev Math operations with safety checks that revert on error\n * Renamed from SafeMath to GnosisSafeMath to avoid conflicts\n * TODO: remove once open zeppelin update to solc 0.5.0\n */\nlibrary GnosisSafeMath {\n /**\n * @dev Multiplies two numbers, reverts on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b);\n\n return c;\n }\n\n /**\n * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Adds two numbers, reverts on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a);\n\n return c;\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./base/ModuleManager.sol\";\nimport \"./base/OwnerManager.sol\";\nimport \"./base/FallbackManager.sol\";\nimport \"./base/GuardManager.sol\";\nimport \"./common/EtherPaymentFallback.sol\";\nimport \"./common/Singleton.sol\";\nimport \"./common/SignatureDecoder.sol\";\nimport \"./common/SecuredTokenTransfer.sol\";\nimport \"./common/StorageAccessible.sol\";\nimport \"./interfaces/ISignatureValidator.sol\";\nimport \"./external/GnosisSafeMath.sol\";\n\n/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafe is\n EtherPaymentFallback,\n Singleton,\n ModuleManager,\n OwnerManager,\n SignatureDecoder,\n SecuredTokenTransfer,\n ISignatureValidatorConstants,\n FallbackManager,\n StorageAccessible,\n GuardManager\n{\n using GnosisSafeMath for uint256;\n\n string public constant VERSION = \"1.3.0\";\n\n // keccak256(\n // \"EIP712Domain(uint256 chainId,address verifyingContract)\"\n // );\n bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;\n\n // keccak256(\n // \"SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)\"\n // );\n bytes32 private constant SAFE_TX_TYPEHASH = 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8;\n\n event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler);\n event ApproveHash(bytes32 indexed approvedHash, address indexed owner);\n event SignMsg(bytes32 indexed msgHash);\n event ExecutionFailure(bytes32 txHash, uint256 payment);\n event ExecutionSuccess(bytes32 txHash, uint256 payment);\n\n uint256 public nonce;\n bytes32 private _deprecatedDomainSeparator;\n // Mapping to keep track of all message hashes that have been approve by ALL REQUIRED owners\n mapping(bytes32 => uint256) public signedMessages;\n // Mapping to keep track of all hashes (message or transaction) that have been approve by ANY owners\n mapping(address => mapping(bytes32 => uint256)) public approvedHashes;\n\n // This constructor ensures that this contract can only be used as a master copy for Proxy contracts\n constructor() {\n // By setting the threshold it is not possible to call setup anymore,\n // so we create a Safe with 0 owners and threshold 1.\n // This is an unusable Safe, perfect for the singleton\n threshold = 1;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _owners List of Safe owners.\n /// @param _threshold Number of required confirmations for a Safe transaction.\n /// @param to Contract address for optional delegate call.\n /// @param data Data payload for optional delegate call.\n /// @param fallbackHandler Handler for fallback calls to this contract\n /// @param paymentToken Token that should be used for the payment (0 is ETH)\n /// @param payment Value that should be paid\n /// @param paymentReceiver Adddress that should receive the payment (or 0 if tx.origin)\n function setup(\n address[] calldata _owners,\n uint256 _threshold,\n address to,\n bytes calldata data,\n address fallbackHandler,\n address paymentToken,\n uint256 payment,\n address payable paymentReceiver\n ) external {\n // setupOwners checks if the Threshold is already set, therefore preventing that this method is called twice\n setupOwners(_owners, _threshold);\n if (fallbackHandler != address(0)) internalSetFallbackHandler(fallbackHandler);\n // As setupOwners can only be called if the contract has not been initialized we don't need a check for setupModules\n setupModules(to, data);\n\n if (payment > 0) {\n // To avoid running into issues with EIP-170 we reuse the handlePayment function (to avoid adjusting code of that has been verified we do not adjust the method itself)\n // baseGas = 0, gasPrice = 1 and gas = payment => amount = (payment + 0) * 1 = payment\n handlePayment(payment, 0, 1, paymentToken, paymentReceiver);\n }\n emit SafeSetup(msg.sender, _owners, _threshold, to, fallbackHandler);\n }\n\n /// @dev Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction.\n /// Note: The fees are always transferred, even if the user transaction fails.\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @param safeTxGas Gas that should be used for the Safe transaction.\n /// @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Gas price that should be used for the payment calculation.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})\n function execTransaction(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures\n ) public payable virtual returns (bool success) {\n bytes32 txHash;\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n bytes memory txHashData =\n encodeTransactionData(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n nonce\n );\n // Increase nonce and execute transaction.\n nonce++;\n txHash = keccak256(txHashData);\n checkSignatures(txHash, txHashData, signatures);\n }\n address guard = getGuard();\n {\n if (guard != address(0)) {\n Guard(guard).checkTransaction(\n // Transaction info\n to,\n value,\n data,\n operation,\n safeTxGas,\n // Payment info\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n // Signature info\n signatures,\n msg.sender\n );\n }\n }\n // We require some gas to emit the events (at least 2500) after the execution and some to perform code until the execution (500)\n // We also include the 1/64 in the check that is not send along with a call to counteract potential shortings because of EIP-150\n require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, \"GS010\");\n // Use scope here to limit variable lifetime and prevent `stack too deep` errors\n {\n uint256 gasUsed = gasleft();\n // If the gasPrice is 0 we assume that nearly all available gas can be used (it is always more than safeTxGas)\n // We only substract 2500 (compared to the 3000 before) to ensure that the amount passed is still higher than safeTxGas\n success = execute(to, value, data, operation, gasPrice == 0 ? (gasleft() - 2500) : safeTxGas);\n gasUsed = gasUsed.sub(gasleft());\n // If no safeTxGas and no gasPrice was set (e.g. both are 0), then the internal tx is required to be successful\n // This makes it possible to use `estimateGas` without issues, as it searches for the minimum gas where the tx doesn't revert\n require(success || safeTxGas != 0 || gasPrice != 0, \"GS013\");\n // We transfer the calculated tx costs to the tx.origin to avoid sending it to intermediate contracts that have made calls\n uint256 payment = 0;\n if (gasPrice > 0) {\n payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);\n }\n if (success) emit ExecutionSuccess(txHash, payment);\n else emit ExecutionFailure(txHash, payment);\n }\n {\n if (guard != address(0)) {\n Guard(guard).checkAfterExecution(txHash, success);\n }\n }\n }\n\n function handlePayment(\n uint256 gasUsed,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver\n ) private returns (uint256 payment) {\n // solhint-disable-next-line avoid-tx-origin\n address payable receiver = refundReceiver == address(0) ? payable(tx.origin) : refundReceiver;\n if (gasToken == address(0)) {\n // For ETH we will only adjust the gas price to not be higher than the actual used gas price\n payment = gasUsed.add(baseGas).mul(gasPrice < tx.gasprice ? gasPrice : tx.gasprice);\n require(receiver.send(payment), \"GS011\");\n } else {\n payment = gasUsed.add(baseGas).mul(gasPrice);\n require(transferToken(gasToken, receiver, payment), \"GS012\");\n }\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n */\n function checkSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures\n ) public view {\n // Load threshold to avoid multiple storage loads\n uint256 _threshold = threshold;\n // Check that a threshold is set\n require(_threshold > 0, \"GS001\");\n checkNSignatures(dataHash, data, signatures, _threshold);\n }\n\n /**\n * @dev Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.\n * @param dataHash Hash of the data (could be either a message hash or transaction hash)\n * @param data That should be signed (this is passed to an external validator contract)\n * @param signatures Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.\n * @param requiredSignatures Amount of required valid signatures.\n */\n function checkNSignatures(\n bytes32 dataHash,\n bytes memory data,\n bytes memory signatures,\n uint256 requiredSignatures\n ) public view {\n // Check that the provided signature data is not too short\n require(signatures.length >= requiredSignatures.mul(65), \"GS020\");\n // There cannot be an owner with address 0.\n address lastOwner = address(0);\n address currentOwner;\n uint8 v;\n bytes32 r;\n bytes32 s;\n uint256 i;\n for (i = 0; i < requiredSignatures; i++) {\n (v, r, s) = signatureSplit(signatures, i);\n if (v == 0) {\n // If v is 0 then it is a contract signature\n // When handling contract signatures the address of the contract is encoded into r\n currentOwner = address(uint160(uint256(r)));\n\n // Check that signature data pointer (s) is not pointing inside the static part of the signatures bytes\n // This check is not completely accurate, since it is possible that more signatures than the threshold are send.\n // Here we only check that the pointer is not pointing inside the part that is being processed\n require(uint256(s) >= requiredSignatures.mul(65), \"GS021\");\n\n // Check that signature data pointer (s) is in bounds (points to the length of data -> 32 bytes)\n require(uint256(s).add(32) <= signatures.length, \"GS022\");\n\n // Check if the contract signature is in bounds: start of data is s + 32 and end is start + signature length\n uint256 contractSignatureLen;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSignatureLen := mload(add(add(signatures, s), 0x20))\n }\n require(uint256(s).add(32).add(contractSignatureLen) <= signatures.length, \"GS023\");\n\n // Check signature\n bytes memory contractSignature;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // The signature data for contract signatures is appended to the concatenated signatures and the offset is stored in s\n contractSignature := add(add(signatures, s), 0x20)\n }\n require(ISignatureValidator(currentOwner).isValidSignature(data, contractSignature) == EIP1271_MAGIC_VALUE, \"GS024\");\n } else if (v == 1) {\n // If v is 1 then it is an approved hash\n // When handling approved hashes the address of the approver is encoded into r\n currentOwner = address(uint160(uint256(r)));\n // Hashes are automatically approved by the sender of the message or when they have been pre-approved via a separate transaction\n require(msg.sender == currentOwner || approvedHashes[currentOwner][dataHash] != 0, \"GS025\");\n } else if (v > 30) {\n // If v > 30 then default va (27,28) has been adjusted for eth_sign flow\n // To support eth_sign and similar we adjust v and hash the messageHash with the Ethereum message prefix before applying ecrecover\n currentOwner = ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", dataHash)), v - 4, r, s);\n } else {\n // Default is the ecrecover flow with the provided data hash\n // Use ecrecover with the messageHash for EOA signatures\n currentOwner = ecrecover(dataHash, v, r, s);\n }\n require(currentOwner > lastOwner && owners[currentOwner] != address(0) && currentOwner != SENTINEL_OWNERS, \"GS026\");\n lastOwner = currentOwner;\n }\n }\n\n /// @dev Allows to estimate a Safe transaction.\n /// This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data.\n /// Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`\n /// @param to Destination address of Safe transaction.\n /// @param value Ether value of Safe transaction.\n /// @param data Data payload of Safe transaction.\n /// @param operation Operation type of Safe transaction.\n /// @return Estimate without refunds and overhead fees (base transaction and payload data gas costs).\n /// @notice Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.\n function requiredTxGas(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation\n ) external returns (uint256) {\n uint256 startGas = gasleft();\n // We don't provide an error message here, as we use it to return the estimate\n require(execute(to, value, data, operation, gasleft()));\n uint256 requiredGas = startGas - gasleft();\n // Convert response to string and return via error message\n revert(string(abi.encodePacked(requiredGas)));\n }\n\n /**\n * @dev Marks a hash as approved. This can be used to validate a hash that is used by a signature.\n * @param hashToApprove The hash that should be marked as approved for signatures that are verified by this contract.\n */\n function approveHash(bytes32 hashToApprove) external {\n require(owners[msg.sender] != address(0), \"GS030\");\n approvedHashes[msg.sender][hashToApprove] = 1;\n emit ApproveHash(hashToApprove, msg.sender);\n }\n\n /// @dev Returns the chain id used by this contract.\n function getChainId() public view returns (uint256) {\n uint256 id;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n id := chainid()\n }\n return id;\n }\n\n function domainSeparator() public view returns (bytes32) {\n return keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, getChainId(), this));\n }\n\n /// @dev Returns the bytes that are hashed to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Gas that should be used for the safe transaction.\n /// @param baseGas Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash bytes.\n function encodeTransactionData(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes memory) {\n bytes32 safeTxHash =\n keccak256(\n abi.encode(\n SAFE_TX_TYPEHASH,\n to,\n value,\n keccak256(data),\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n _nonce\n )\n );\n return abi.encodePacked(bytes1(0x19), bytes1(0x01), domainSeparator(), safeTxHash);\n }\n\n /// @dev Returns hash to be signed by owners.\n /// @param to Destination address.\n /// @param value Ether value.\n /// @param data Data payload.\n /// @param operation Operation type.\n /// @param safeTxGas Fas that should be used for the safe transaction.\n /// @param baseGas Gas costs for data used to trigger the safe transaction.\n /// @param gasPrice Maximum gas price that should be used for this transaction.\n /// @param gasToken Token address (or 0 if ETH) that is used for the payment.\n /// @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin).\n /// @param _nonce Transaction nonce.\n /// @return Transaction hash.\n function getTransactionHash(\n address to,\n uint256 value,\n bytes calldata data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address refundReceiver,\n uint256 _nonce\n ) public view returns (bytes32) {\n return keccak256(encodeTransactionData(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./DefaultCallbackHandler.sol\";\nimport \"../interfaces/ISignatureValidator.sol\";\nimport \"../GnosisSafe.sol\";\n\n/// @title Compatibility Fallback Handler - fallback handler to provider compatibility between pre 1.3.0 and 1.3.0+ Safe contracts\n/// @author Richard Meissner - \ncontract CompatibilityFallbackHandler is DefaultCallbackHandler, ISignatureValidator {\n //keccak256(\n // \"SafeMessage(bytes message)\"\n //);\n bytes32 private constant SAFE_MSG_TYPEHASH = 0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca;\n\n bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256(\"simulate(address,bytes)\"));\n\n address internal constant SENTINEL_MODULES = address(0x1);\n bytes4 internal constant UPDATED_MAGIC_VALUE = 0x1626ba7e;\n\n /**\n * Implementation of ISignatureValidator (see `interfaces/ISignatureValidator.sol`)\n * @dev Should return whether the signature provided is valid for the provided data.\n * @param _data Arbitrary length data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _data\n * @return a bool upon valid or invalid signature with corresponding _data\n */\n function isValidSignature(bytes calldata _data, bytes calldata _signature) public view override returns (bytes4) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n bytes32 messageHash = getMessageHashForSafe(safe, _data);\n if (_signature.length == 0) {\n require(safe.signedMessages(messageHash) != 0, \"Hash not approved\");\n } else {\n safe.checkSignatures(messageHash, _data, _signature);\n }\n return EIP1271_MAGIC_VALUE;\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHash(bytes memory message) public view returns (bytes32) {\n return getMessageHashForSafe(GnosisSafe(payable(msg.sender)), message);\n }\n\n /// @dev Returns hash of a message that can be signed by owners.\n /// @param safe Safe to which the message is targeted\n /// @param message Message that should be hashed\n /// @return Message hash.\n function getMessageHashForSafe(GnosisSafe safe, bytes memory message) public view returns (bytes32) {\n bytes32 safeMessageHash = keccak256(abi.encode(SAFE_MSG_TYPEHASH, keccak256(message)));\n return keccak256(abi.encodePacked(bytes1(0x19), bytes1(0x01), safe.domainSeparator(), safeMessageHash));\n }\n\n /**\n * Implementation of updated EIP-1271\n * @dev Should return whether the signature provided is valid for the provided data.\n * The save does not implement the interface since `checkSignatures` is not a view method.\n * The method will not perform any state changes (see parameters of `checkSignatures`)\n * @param _dataHash Hash of the data signed on the behalf of address(msg.sender)\n * @param _signature Signature byte array associated with _dataHash\n * @return a bool upon valid or invalid signature with corresponding _dataHash\n * @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol\n */\n function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view returns (bytes4) {\n ISignatureValidator validator = ISignatureValidator(msg.sender);\n bytes4 value = validator.isValidSignature(abi.encode(_dataHash), _signature);\n return (value == EIP1271_MAGIC_VALUE) ? UPDATED_MAGIC_VALUE : bytes4(0);\n }\n\n /// @dev Returns array of first 10 modules.\n /// @return Array of modules.\n function getModules() external view returns (address[] memory) {\n // Caller should be a Safe\n GnosisSafe safe = GnosisSafe(payable(msg.sender));\n (address[] memory array, ) = safe.getModulesPaginated(SENTINEL_MODULES, 10);\n return array;\n }\n\n /**\n * @dev Performs a delegetecall on a targetContract in the context of self.\n * Internally reverts execution to avoid side effects (making it static). Catches revert and returns encoded result as bytes.\n * @param targetContract Address of the contract containing the code to execute.\n * @param calldataPayload Calldata that should be sent to the target contract (encoded method name and arguments).\n */\n function simulate(address targetContract, bytes calldata calldataPayload) external returns (bytes memory response) {\n // Suppress compiler warnings about not using parameters, while allowing\n // parameters to keep names for documentation purposes. This does not\n // generate code.\n targetContract;\n calldataPayload;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let internalCalldata := mload(0x40)\n // Store `simulateAndRevert.selector`.\n // String representation is used to force right padding\n mstore(internalCalldata, \"\\xb4\\xfa\\xba\\x09\")\n // Abuse the fact that both this and the internal methods have the\n // same signature, and differ only in symbol name (and therefore,\n // selector) and copy calldata directly. This saves us approximately\n // 250 bytes of code and 300 gas at runtime over the\n // `abi.encodeWithSelector` builtin.\n calldatacopy(add(internalCalldata, 0x04), 0x04, sub(calldatasize(), 0x04))\n\n // `pop` is required here by the compiler, as top level expressions\n // can't have return values in inline assembly. `call` typically\n // returns a 0 or 1 value indicated whether or not it reverted, but\n // since we know it will always revert, we can safely ignore it.\n pop(\n call(\n gas(),\n // address() has been changed to caller() to use the implementation of the Safe\n caller(),\n 0,\n internalCalldata,\n calldatasize(),\n // The `simulateAndRevert` call always reverts, and\n // instead encodes whether or not it was successful in the return\n // data. The first 32-byte word of the return data contains the\n // `success` value, so write it to memory address 0x00 (which is\n // reserved Solidity scratch space and OK to use).\n 0x00,\n 0x20\n )\n )\n\n // Allocate and copy the response bytes, making sure to increment\n // the free memory pointer accordingly (in case this method is\n // called as an internal function). The remaining `returndata[0x20:]`\n // contains the ABI encoded response bytes, so we can just write it\n // as is to memory.\n let responseSize := sub(returndatasize(), 0x20)\n response := mload(0x40)\n mstore(0x40, add(response, responseSize))\n returndatacopy(response, 0x20, responseSize)\n\n if iszero(mload(0x00)) {\n revert(add(response, 0x20), mload(response))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/handler/DefaultCallbackHandler.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/ERC1155TokenReceiver.sol\";\nimport \"../interfaces/ERC721TokenReceiver.sol\";\nimport \"../interfaces/ERC777TokensRecipient.sol\";\nimport \"../interfaces/IERC165.sol\";\n\n/// @title Default Callback Handler - returns true for known token callbacks\n/// @author Richard Meissner - \ncontract DefaultCallbackHandler is ERC1155TokenReceiver, ERC777TokensRecipient, ERC721TokenReceiver, IERC165 {\n string public constant NAME = \"Default Callback Handler\";\n string public constant VERSION = \"1.0.0\";\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address,\n address,\n uint256[] calldata,\n uint256[] calldata,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0xbc197c81;\n }\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n ) external pure override returns (bytes4) {\n return 0x150b7a02;\n }\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n ) external pure override {\n // We implement this for completeness, doesn't really have any value\n }\n\n function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {\n return\n interfaceId == type(ERC1155TokenReceiver).interfaceId ||\n interfaceId == type(ERC721TokenReceiver).interfaceId ||\n interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC1155TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n Note: The ERC-165 identifier for this interface is 0x4e2312e0.\n*/\ninterface ERC1155TokenReceiver {\n /**\n @notice Handle the receipt of a single ERC1155 token type.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61) if it accepts the transfer.\n This function MUST revert if it rejects the transfer.\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _id The ID of the token being transferred\n @param _value The amount of tokens being transferred\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n */\n function onERC1155Received(\n address _operator,\n address _from,\n uint256 _id,\n uint256 _value,\n bytes calldata _data\n ) external returns (bytes4);\n\n /**\n @notice Handle the receipt of multiple ERC1155 token types.\n @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated. \n This function MUST return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81) if it accepts the transfer(s).\n This function MUST revert if it rejects the transfer(s).\n Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.\n @param _operator The address which initiated the batch transfer (i.e. msg.sender)\n @param _from The address which previously owned the token\n @param _ids An array containing ids of each token being transferred (order and length must match _values array)\n @param _values An array containing amounts of each token being transferred (order and length must match _ids array)\n @param _data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n */\n function onERC1155BatchReceived(\n address _operator,\n address _from,\n uint256[] calldata _ids,\n uint256[] calldata _values,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ERC777TokensRecipient.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ninterface ERC777TokensRecipient {\n function tokensReceived(\n address operator,\n address from,\n address to,\n uint256 amount,\n bytes calldata data,\n bytes calldata operatorData\n ) external;\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @notice More details at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\ncontract ISignatureValidatorConstants {\n // bytes4(keccak256(\"isValidSignature(bytes,bytes)\")\n bytes4 internal constant EIP1271_MAGIC_VALUE = 0x20c13b0b;\n}\n\nabstract contract ISignatureValidator is ISignatureValidatorConstants {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n *\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes memory _data, bytes memory _signature) public view virtual returns (bytes4);\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title Multi Send - Allows to batch multiple transactions into one.\n/// @author Nick Dodson - \n/// @author Gonçalo Sá - \n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract MultiSend {\n address private immutable multisendSingleton;\n\n constructor() {\n multisendSingleton = address(this);\n }\n\n /// @dev Sends multiple transactions and reverts all if one fails.\n /// @param transactions Encoded transactions. Each transaction is encoded as a packed bytes of\n /// operation as a uint8 with 0 for a call or 1 for a delegatecall (=> 1 byte),\n /// to as a address (=> 20 bytes),\n /// value as a uint256 (=> 32 bytes),\n /// data length as a uint256 (=> 32 bytes),\n /// data as bytes.\n /// see abi.encodePacked for more information on packed encoding\n /// @notice This method is payable as delegatecalls keep the msg.value from the previous call\n /// If the calling method (e.g. execTransaction) received ETH this would revert otherwise\n function multiSend(bytes memory transactions) public payable {\n require(address(this) != multisendSingleton, \"MultiSend should only be called via delegatecall\");\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let length := mload(transactions)\n let i := 0x20\n for {\n // Pre block is not used in \"while mode\"\n } lt(i, length) {\n // Post block is not used in \"while mode\"\n } {\n // First byte of the data is the operation.\n // We shift by 248 bits (256 - 8 [operation byte]) it right since mload will always load 32 bytes (a word).\n // This will also zero out unused data.\n let operation := shr(0xf8, mload(add(transactions, i)))\n // We offset the load address by 1 byte (operation byte)\n // We shift it right by 96 bits (256 - 160 [20 address bytes]) to right-align the data and zero out unused data.\n let to := shr(0x60, mload(add(transactions, add(i, 0x01))))\n // We offset the load address by 21 byte (operation byte + 20 address bytes)\n let value := mload(add(transactions, add(i, 0x15)))\n // We offset the load address by 53 byte (operation byte + 20 address bytes + 32 value bytes)\n let dataLength := mload(add(transactions, add(i, 0x35)))\n // We offset the load address by 85 byte (operation byte + 20 address bytes + 32 value bytes + 32 data length bytes)\n let data := add(transactions, add(i, 0x55))\n let success := 0\n switch operation\n case 0 {\n success := call(gas(), to, value, data, dataLength, 0, 0)\n }\n case 1 {\n success := delegatecall(gas(), to, data, dataLength, 0, 0)\n }\n if eq(success, 0) {\n revert(0, 0)\n }\n // Next entry starts at 85 byte + data length\n i := add(i, add(0x55, dataLength))\n }\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/// @title IProxy - Helper interface to access masterCopy of the Proxy on-chain\n/// @author Richard Meissner - \ninterface IProxy {\n function masterCopy() external view returns (address);\n}\n\n/// @title GnosisSafeProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.\n/// @author Stefan George - \n/// @author Richard Meissner - \ncontract GnosisSafeProxy {\n // singleton always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.\n // To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`\n address internal singleton;\n\n /// @dev Constructor function sets address of singleton contract.\n /// @param _singleton Singleton address.\n constructor(address _singleton) {\n require(_singleton != address(0), \"Invalid singleton address provided\");\n singleton = _singleton;\n }\n\n /// @dev Fallback function forwards all transactions and returns all received return data.\n fallback() external payable {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let _singleton := and(sload(0), 0xffffffffffffffffffffffffffffffffffffffff)\n // 0xa619486e == keccak(\"masterCopy()\"). The value is right padded to 32-bytes with 0s\n if eq(calldataload(0), 0xa619486e00000000000000000000000000000000000000000000000000000000) {\n mstore(0, _singleton)\n return(0, 0x20)\n }\n calldatacopy(0, 0, calldatasize())\n let success := delegatecall(gas(), _singleton, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n if eq(success, 0) {\n revert(0, returndatasize())\n }\n return(0, returndatasize())\n }\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"./GnosisSafeProxy.sol\";\nimport \"./IProxyCreationCallback.sol\";\n\n/// @title Proxy Factory - Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n/// @author Stefan George - \ncontract GnosisSafeProxyFactory {\n event ProxyCreation(GnosisSafeProxy proxy, address singleton);\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param singleton Address of singleton contract.\n /// @param data Payload for message call sent to new proxy contract.\n function createProxy(address singleton, bytes memory data) public returns (GnosisSafeProxy proxy) {\n proxy = new GnosisSafeProxy(singleton);\n if (data.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(data, 0x20), mload(data), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, singleton);\n }\n\n /// @dev Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.\n function proxyRuntimeCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).runtimeCode;\n }\n\n /// @dev Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.\n function proxyCreationCode() public pure returns (bytes memory) {\n return type(GnosisSafeProxy).creationCode;\n }\n\n /// @dev Allows to create new proxy contact using CREATE2 but it doesn't run the initializer.\n /// This method is only meant as an utility to be called from other methods\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function deployProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) internal returns (GnosisSafeProxy proxy) {\n // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it\n bytes32 salt = keccak256(abi.encodePacked(keccak256(initializer), saltNonce));\n bytes memory deploymentData = abi.encodePacked(type(GnosisSafeProxy).creationCode, uint256(uint160(_singleton)));\n // solhint-disable-next-line no-inline-assembly\n assembly {\n proxy := create2(0x0, add(0x20, deploymentData), mload(deploymentData), salt)\n }\n require(address(proxy) != address(0), \"Create2 call failed\");\n }\n\n /// @dev Allows to create new proxy contact and execute a message call to the new proxy within one transaction.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function createProxyWithNonce(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n if (initializer.length > 0)\n // solhint-disable-next-line no-inline-assembly\n assembly {\n if eq(call(gas(), proxy, 0, add(initializer, 0x20), mload(initializer), 0, 0), 0) {\n revert(0, 0)\n }\n }\n emit ProxyCreation(proxy, _singleton);\n }\n\n /// @dev Allows to create new proxy contact, execute a message call to the new proxy and call a specified callback within one transaction\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n /// @param callback Callback that will be invoced after the new proxy contract has been successfully deployed and initialized.\n function createProxyWithCallback(\n address _singleton,\n bytes memory initializer,\n uint256 saltNonce,\n IProxyCreationCallback callback\n ) public returns (GnosisSafeProxy proxy) {\n uint256 saltNonceWithCallback = uint256(keccak256(abi.encodePacked(saltNonce, callback)));\n proxy = createProxyWithNonce(_singleton, initializer, saltNonceWithCallback);\n if (address(callback) != address(0)) callback.proxyCreated(proxy, _singleton, initializer, saltNonce);\n }\n\n /// @dev Allows to get the address for a new proxy contact created via `createProxyWithNonce`\n /// This method is only meant for address calculation purpose when you use an initializer that would revert,\n /// therefore the response is returned with a revert. When calling this method set `from` to the address of the proxy factory.\n /// @param _singleton Address of singleton contract.\n /// @param initializer Payload for message call sent to new proxy contract.\n /// @param saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.\n function calculateCreateProxyWithNonceAddress(\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external returns (GnosisSafeProxy proxy) {\n proxy = deployProxyWithNonce(_singleton, initializer, saltNonce);\n revert(string(abi.encodePacked(proxy)));\n }\n}\n" + }, + "@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\nimport \"./GnosisSafeProxy.sol\";\n\ninterface IProxyCreationCallback {\n function proxyCreated(\n GnosisSafeProxy proxy,\n address _singleton,\n bytes calldata initializer,\n uint256 saltNonce\n ) external;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/core/Module.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Module Interface - A contract that can pass messages to a Module Manager contract if enabled by that contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"../interfaces/IAvatar.sol\";\nimport \"../factory/FactoryFriendly.sol\";\nimport \"../guard/Guardable.sol\";\n\nabstract contract Module is FactoryFriendly, Guardable {\n /// @dev Address that will ultimately execute function calls.\n address public avatar;\n /// @dev Address that this module will pass transactions to.\n address public target;\n\n /// @dev Emitted each time the avatar is set.\n event AvatarSet(address indexed previousAvatar, address indexed newAvatar);\n /// @dev Emitted each time the Target is set.\n event TargetSet(address indexed previousTarget, address indexed newTarget);\n\n /// @dev Sets the avatar to a new avatar (`newAvatar`).\n /// @notice Can only be called by the current owner.\n function setAvatar(address _avatar) public onlyOwner {\n address previousAvatar = avatar;\n avatar = _avatar;\n emit AvatarSet(previousAvatar, _avatar);\n }\n\n /// @dev Sets the target to a new target (`newTarget`).\n /// @notice Can only be called by the current owner.\n function setTarget(address _target) public onlyOwner {\n address previousTarget = target;\n target = _target;\n emit TargetSet(previousTarget, _target);\n }\n\n /// @dev Passes a transaction to be executed by the avatar.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success) {\n (success, ) = _exec(to, value, data, operation);\n }\n\n /// @dev Passes a transaction to be executed by the target and returns data.\n /// @notice Can only be called by this contract.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execAndReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) internal returns (bool success, bytes memory returnData) {\n (success, returnData) = _exec(to, value, data, operation);\n }\n\n function _exec(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) private returns (bool success, bytes memory returnData) {\n address currentGuard = guard;\n if (currentGuard != address(0)) {\n IGuard(currentGuard).checkTransaction(\n /// Transaction info used by module transactions.\n to,\n value,\n data,\n operation,\n /// Zero out the redundant transaction information only used for Safe multisig transctions.\n 0,\n 0,\n 0,\n address(0),\n payable(0),\n \"\",\n msg.sender\n );\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n IGuard(currentGuard).checkAfterExecution(\"\", success);\n } else {\n (success, returnData) = IAvatar(target)\n .execTransactionFromModuleReturnData(\n to,\n value,\n data,\n operation\n );\n }\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac FactoryFriendly - A contract that allows other contracts to be initializable and pass bytes as arguments to define contract state\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nabstract contract FactoryFriendly is OwnableUpgradeable {\n function setUp(bytes memory initializeParams) public virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.8.0;\n\ncontract ModuleProxyFactory {\n event ModuleProxyCreation(\n address indexed proxy,\n address indexed masterCopy\n );\n\n /// `target` can not be zero.\n error ZeroAddress(address target);\n\n /// `target` has no code deployed.\n error TargetHasNoCode(address target);\n\n /// `address_` is already taken.\n error TakenAddress(address address_);\n\n /// @notice Initialization failed.\n error FailedInitialization();\n\n function createProxy(address target, bytes32 salt)\n internal\n returns (address result)\n {\n if (address(target) == address(0)) revert ZeroAddress(target);\n if (address(target).code.length == 0) revert TargetHasNoCode(target);\n bytes memory deployment = abi.encodePacked(\n hex\"602d8060093d393df3363d3d373d3d3d363d73\",\n target,\n hex\"5af43d82803e903d91602b57fd5bf3\"\n );\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := create2(0, add(deployment, 0x20), mload(deployment), salt)\n }\n if (result == address(0)) revert TakenAddress(result);\n }\n\n function deployModule(\n address masterCopy,\n bytes memory initializer,\n uint256 saltNonce\n ) public returns (address proxy) {\n proxy = createProxy(\n masterCopy,\n keccak256(abi.encodePacked(keccak256(initializer), saltNonce))\n );\n (bool success, ) = proxy.call(initializer);\n if (!success) revert FailedInitialization();\n\n emit ModuleProxyCreation(proxy, masterCopy);\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/BaseGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"../interfaces/IGuard.sol\";\n\nabstract contract BaseGuard is IERC165 {\n function supportsInterface(bytes4 interfaceId)\n external\n pure\n override\n returns (bool)\n {\n return\n interfaceId == type(IGuard).interfaceId || // 0xe6d7a83a\n interfaceId == type(IERC165).interfaceId; // 0x01ffc9a7\n }\n\n /// @dev Module transactions only use the first four parameters: to, value, data, and operation.\n /// Module.sol hardcodes the remaining parameters as 0 since they are not used for module transactions.\n /// @notice This interface is used to maintain compatibilty with Gnosis Safe transaction guards.\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external virtual;\n\n function checkAfterExecution(bytes32 txHash, bool success) external virtual;\n}\n" + }, + "@gnosis.pm/zodiac/contracts/guard/Guardable.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"./BaseGuard.sol\";\n\n/// @title Guardable - A contract that manages fallback calls made to this contract\ncontract Guardable is OwnableUpgradeable {\n address public guard;\n\n event ChangedGuard(address guard);\n\n /// `guard_` does not implement IERC165.\n error NotIERC165Compliant(address guard_);\n\n /// @dev Set a guard that checks transactions before execution.\n /// @param _guard The address of the guard to be used or the 0 address to disable the guard.\n function setGuard(address _guard) external onlyOwner {\n if (_guard != address(0)) {\n if (!BaseGuard(_guard).supportsInterface(type(IGuard).interfaceId))\n revert NotIERC165Compliant(_guard);\n }\n guard = _guard;\n emit ChangedGuard(guard);\n }\n\n function getGuard() external view returns (address _guard) {\n return guard;\n }\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\n\n/// @title Zodiac Avatar - A contract that manages modules that can execute transactions via this contract.\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IAvatar {\n event EnabledModule(address module);\n event DisabledModule(address module);\n event ExecutionFromModuleSuccess(address indexed module);\n event ExecutionFromModuleFailure(address indexed module);\n\n /// @dev Enables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Modules should be stored as a linked list.\n /// @notice Must emit EnabledModule(address module) if successful.\n /// @param module Module to be enabled.\n function enableModule(address module) external;\n\n /// @dev Disables a module on the avatar.\n /// @notice Can only be called by the avatar.\n /// @notice Must emit DisabledModule(address module) if successful.\n /// @param prevModule Address that pointed to the module to be removed in the linked list\n /// @param module Module to be removed.\n function disableModule(address prevModule, address module) external;\n\n /// @dev Allows a Module to execute a transaction.\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModule(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success);\n\n /// @dev Allows a Module to execute a transaction and return data\n /// @notice Can only be called by an enabled module.\n /// @notice Must emit ExecutionFromModuleSuccess(address module) if successful.\n /// @notice Must emit ExecutionFromModuleFailure(address module) if unsuccessful.\n /// @param to Destination address of module transaction.\n /// @param value Ether value of module transaction.\n /// @param data Data payload of module transaction.\n /// @param operation Operation type of module transaction: 0 == call, 1 == delegate call.\n function execTransactionFromModuleReturnData(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation\n ) external returns (bool success, bytes memory returnData);\n\n /// @dev Returns if an module is enabled\n /// @return True if the module is enabled\n function isModuleEnabled(address module) external view returns (bool);\n\n /// @dev Returns array of modules.\n /// @param start Start of the page.\n /// @param pageSize Maximum number of modules that should be returned.\n /// @return array Array of modules.\n /// @return next Start of the next page.\n function getModulesPaginated(address start, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next);\n}\n" + }, + "@gnosis.pm/zodiac/contracts/interfaces/IGuard.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\n\ninterface IGuard {\n function checkTransaction(\n address to,\n uint256 value,\n bytes memory data,\n Enum.Operation operation,\n uint256 safeTxGas,\n uint256 baseGas,\n uint256 gasPrice,\n address gasToken,\n address payable refundReceiver,\n bytes memory signatures,\n address msgSender\n ) external;\n\n function checkAfterExecution(bytes32 txHash, bool success) external;\n}\n" + }, + "@opengsn/contracts/src/BaseRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable no-inline-assembly\npragma solidity >=0.6.9;\n\nimport \"./interfaces/IRelayRecipient.sol\";\n\n/**\n * A base contract to be inherited by any contract that want to receive relayed transactions\n * A subclass must use \"_msgSender()\" instead of \"msg.sender\"\n */\nabstract contract BaseRelayRecipient is IRelayRecipient {\n\n /*\n * Forwarder singleton we accept calls from\n */\n address private _trustedForwarder;\n\n function trustedForwarder() public virtual view returns (address){\n return _trustedForwarder;\n }\n\n function _setTrustedForwarder(address _forwarder) internal {\n _trustedForwarder = _forwarder;\n }\n\n function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {\n return forwarder == _trustedForwarder;\n }\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, return the original sender.\n * otherwise, return `msg.sender`.\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal override virtual view returns (address ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n // At this point we know that the sender is a trusted forwarder,\n // so we trust that the last bytes of msg.data are the verified sender address.\n // extract sender address from the end of msg.data\n assembly {\n ret := shr(96,calldataload(sub(calldatasize(),20)))\n }\n } else {\n ret = msg.sender;\n }\n }\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal override virtual view returns (bytes calldata ret) {\n if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {\n return msg.data[0:msg.data.length-20];\n } else {\n return msg.data;\n }\n }\n}\n" + }, + "@opengsn/contracts/src/interfaces/IRelayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0;\n\n/**\n * a contract must implement this interface in order to support relayed transaction.\n * It is better to inherit the BaseRelayRecipient as its implementation.\n */\nabstract contract IRelayRecipient {\n\n /**\n * return if the forwarder is trusted to forward relayed transactions to us.\n * the forwarder is required to verify the sender's signature, and verify\n * the call is not a replay.\n */\n function isTrustedForwarder(address forwarder) public virtual view returns(bool);\n\n /**\n * return the sender of this call.\n * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes\n * of the msg.data.\n * otherwise, return `msg.sender`\n * should be used in the contract anywhere instead of msg.sender\n */\n function _msgSender() internal virtual view returns (address);\n\n /**\n * return the msg.data of this call.\n * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes\n * of the msg.data - so this method will strip those 20 bytes off.\n * otherwise (if the call was made directly and not through the forwarder), return `msg.data`\n * should be used in the contract instead of msg.data, where this difference matters.\n */\n function _msgData() internal virtual view returns (bytes calldata);\n\n function versionRecipient() external virtual view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeTo(address newImplementation) external virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20Upgradeable.sol\";\nimport \"./extensions/IERC20MetadataUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[45] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./draft-IERC20PermitUpgradeable.sol\";\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"../../../utils/cryptography/EIP712Upgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private constant _PERMIT_TYPEHASH =\n keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n /**\n * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n * However, to ensure consistency with the upgradeable transpiler, we will continue\n * to reserve a slot.\n * @custom:oz-renamed-from _PERMIT_TYPEHASH\n */\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n function __ERC20Permit_init(string memory name) internal onlyInitializing {\n __EIP712_init_unchained(name, \"1\");\n }\n\n function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC20Snapshot.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20Upgradeable.sol\";\nimport \"../../../utils/ArraysUpgradeable.sol\";\nimport \"../../../utils/CountersUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and\n * total supply at the time are recorded for later access.\n *\n * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.\n * In naive implementations it's possible to perform a \"double spend\" attack by reusing the same balance from different\n * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be\n * used to create an efficient ERC20 forking mechanism.\n *\n * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a\n * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot\n * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id\n * and the account address.\n *\n * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it\n * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this\n * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.\n *\n * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient\n * alternative consider {ERC20Votes}.\n *\n * ==== Gas Costs\n *\n * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log\n * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much\n * smaller since identical balances in subsequent snapshots are stored as a single entry.\n *\n * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is\n * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent\n * transfers will have normal cost until the next snapshot, and so on.\n */\n\nabstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable {\n function __ERC20Snapshot_init() internal onlyInitializing {\n }\n\n function __ERC20Snapshot_init_unchained() internal onlyInitializing {\n }\n // Inspired by Jordi Baylina's MiniMeToken to record historical balances:\n // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol\n\n using ArraysUpgradeable for uint256[];\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a\n // Snapshot struct, but that would impede usage of functions that work on an array.\n struct Snapshots {\n uint256[] ids;\n uint256[] values;\n }\n\n mapping(address => Snapshots) private _accountBalanceSnapshots;\n Snapshots private _totalSupplySnapshots;\n\n // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.\n CountersUpgradeable.Counter private _currentSnapshotId;\n\n /**\n * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.\n */\n event Snapshot(uint256 id);\n\n /**\n * @dev Creates a new snapshot and returns its snapshot id.\n *\n * Emits a {Snapshot} event that contains the same id.\n *\n * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a\n * set of accounts, for example using {AccessControl}, or it may be open to the public.\n *\n * [WARNING]\n * ====\n * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,\n * you must consider that it can potentially be used by attackers in two ways.\n *\n * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow\n * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target\n * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs\n * section above.\n *\n * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.\n * ====\n */\n function _snapshot() internal virtual returns (uint256) {\n _currentSnapshotId.increment();\n\n uint256 currentId = _getCurrentSnapshotId();\n emit Snapshot(currentId);\n return currentId;\n }\n\n /**\n * @dev Get the current snapshotId\n */\n function _getCurrentSnapshotId() internal view virtual returns (uint256) {\n return _currentSnapshotId.current();\n }\n\n /**\n * @dev Retrieves the balance of `account` at the time `snapshotId` was created.\n */\n function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);\n\n return snapshotted ? value : balanceOf(account);\n }\n\n /**\n * @dev Retrieves the total supply at the time `snapshotId` was created.\n */\n function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {\n (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);\n\n return snapshotted ? value : totalSupply();\n }\n\n // Update balance and/or total supply snapshots before the values are modified. This is implemented\n // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n if (from == address(0)) {\n // mint\n _updateAccountSnapshot(to);\n _updateTotalSupplySnapshot();\n } else if (to == address(0)) {\n // burn\n _updateAccountSnapshot(from);\n _updateTotalSupplySnapshot();\n } else {\n // transfer\n _updateAccountSnapshot(from);\n _updateAccountSnapshot(to);\n }\n }\n\n function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {\n require(snapshotId > 0, \"ERC20Snapshot: id is 0\");\n require(snapshotId <= _getCurrentSnapshotId(), \"ERC20Snapshot: nonexistent id\");\n\n // When a valid snapshot is queried, there are three possibilities:\n // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never\n // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds\n // to this id is the current one.\n // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the\n // requested id, and its value is the one to return.\n // c) More snapshots were created after the requested one, and the queried value was later modified. There will be\n // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is\n // larger than the requested one.\n //\n // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if\n // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does\n // exactly this.\n\n uint256 index = snapshots.ids.findUpperBound(snapshotId);\n\n if (index == snapshots.ids.length) {\n return (false, 0);\n } else {\n return (true, snapshots.values[index]);\n }\n }\n\n function _updateAccountSnapshot(address account) private {\n _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));\n }\n\n function _updateTotalSupplySnapshot() private {\n _updateSnapshot(_totalSupplySnapshots, totalSupply());\n }\n\n function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {\n uint256 currentId = _getCurrentSnapshotId();\n if (_lastSnapshotId(snapshots.ids) < currentId) {\n snapshots.ids.push(currentId);\n snapshots.values.push(currentValue);\n }\n }\n\n function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {\n if (ids.length == 0) {\n return 0;\n } else {\n return ids[ids.length - 1];\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ArraysUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Arrays.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./StorageSlotUpgradeable.sol\";\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev Collection of functions related to array types.\n */\nlibrary ArraysUpgradeable {\n using StorageSlotUpgradeable for bytes32;\n\n /**\n * @dev Searches a sorted `array` and returns the first index that contains\n * a value greater or equal to `element`. If no such index exists (i.e. all\n * values in the array are strictly less than `element`), the array length is\n * returned. Time complexity O(log n).\n *\n * `array` is expected to be sorted in ascending order, and to contain no\n * repeated elements.\n */\n function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {\n if (array.length == 0) {\n return 0;\n }\n\n uint256 low = 0;\n uint256 high = array.length;\n\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n\n // Note that mid will always be strictly less than high (i.e. it will be a valid array index)\n // because Math.average rounds down (it does integer division with truncation).\n if (unsafeAccess(array, mid).value > element) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n\n // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.\n if (low > 0 && unsafeAccess(array, low - 1).value == element) {\n return low - 1;\n } else {\n return low;\n }\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getAddressSlot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getBytes32Slot();\n }\n\n /**\n * @dev Access an array in an \"unsafe\" way. Skips solidity \"index-out-of-range\" check.\n *\n * WARNING: Only use if you are certain `pos` is lower than the array length.\n */\n function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) {\n bytes32 slot;\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0, arr.slot)\n slot := add(keccak256(0, 0x20), pos)\n }\n return slot.getUint256Slot();\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\n\nimport \"./EIP712Upgradeable.sol\";\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlotUpgradeable {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/Clones.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address implementation, bytes32 salt)\n internal\n view\n returns (address predicted)\n {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "contracts/Baal.sol": { + "content": "// SPDX-License-Identifier: MIT\n/*\n███ ██ ██ █\n█ █ █ █ █ █ █\n█ ▀ ▄ █▄▄█ █▄▄█ █\n█ ▄▀ █ █ █ █ ███▄\n███ █ █ ▀\n █ █\n ▀ ▀*/\npragma solidity ^0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/base/Executor.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\";\nimport \"@gnosis.pm/zodiac/contracts/core/Module.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/common/Enum.sol\";\nimport \"@opengsn/contracts/src/BaseRelayRecipient.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\nimport \"./interfaces/IBaalToken.sol\";\n\n/// @title Baal ';_;'.\n/// @notice Flexible guild contract inspired by Moloch DAO framework.\ncontract Baal is Module, EIP712Upgradeable, ReentrancyGuardUpgradeable, BaseRelayRecipient {\n using ECDSAUpgradeable for bytes32;\n\n // ERC20 SHARES + LOOT\n\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n IBaalToken public sharesToken; /*Sub ERC20 for loot mgmt*/\n\n address private constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /*ETH reference for redemptions*/\n\n // GOVERNANCE PARAMS\n uint32 public votingPeriod; /* voting period in seconds - amendable through 'period'[2] proposal*/\n uint32 public gracePeriod; /*time delay after proposal voting period for processing*/\n uint32 public proposalCount; /*counter for total `proposals` submitted*/\n uint256 public proposalOffering; /* non-member proposal offering*/\n uint256 public quorumPercent; /* minimum % of shares that must vote yes for it to pass*/\n uint256 public sponsorThreshold; /* minimum number of shares to sponsor a proposal (not %)*/\n uint256 public minRetentionPercent; /* auto-fails a proposal if more than (1- minRetentionPercent) * total shares exit before processing*/\n\n // SHAMAN PERMISSIONS\n bool public adminLock; /* once set to true, no new admin roles can be assigned to shaman */\n bool public managerLock; /* once set to true, no new manager roles can be assigned to shaman */\n bool public governorLock; /* once set to true, no new governor roles can be assigned to shaman */\n mapping(address => uint256) public shamans; /*maps shaman addresses to their permission level*/\n /* permissions registry for shamans\n 0 = no permission\n 1 = admin only\n 2 = manager only\n 4 = governance only\n 3 = admin + manager\n 5 = admin + governance\n 6 = manager + governance\n 7 = admin + manager + governance */\n\n // PROPOSAL TRACKING\n mapping(address => mapping(uint32 => bool)) public memberVoted; /*maps members to their proposal votes (true = voted) */\n mapping(address => uint256) public votingNonces; /*maps members to their voting nonce*/\n mapping(uint256 => Proposal) public proposals; /*maps `proposal id` to struct details*/\n\n // MISCELLANEOUS PARAMS\n uint32 public latestSponsoredProposalId; /* the id of the last proposal to be sponsored */\n address public multisendLibrary; /*address of multisend library*/\n string public override versionRecipient; /* version recipient for OpenGSN */\n\n // SIGNATURE HELPERS\n bytes32 constant VOTE_TYPEHASH = keccak256(\"Vote(string name,address voter,uint256 expiry,uint256 nonce,uint32 proposalId,bool support)\");\n\n // DATA STRUCTURES\n struct Proposal {\n /*Baal proposal details*/\n uint32 id; /*id of this proposal, used in existence checks (increments from 1)*/\n uint32 prevProposalId; /* id of the previous proposal - set at sponsorship from latestSponsoredProposalId */\n uint32 votingStarts; /*starting time for proposal in seconds since unix epoch*/\n uint32 votingEnds; /*termination date for proposal in seconds since unix epoch - derived from `votingPeriod` set on proposal*/\n uint32 graceEnds; /*termination date for proposal in seconds since unix epoch - derived from `gracePeriod` set on proposal*/\n uint32 expiration; /*timestamp after which proposal should be considered invalid and skipped. */\n uint256 baalGas; /* gas needed to process proposal */\n uint256 yesVotes; /*counter for `members` `approved` 'votes' to calculate approval on processing*/\n uint256 noVotes; /*counter for `members` 'dis-approved' 'votes' to calculate approval on processing*/\n uint256 maxTotalSharesAndLootAtVote; /* highest share+loot count during any individual yes vote*/\n uint256 maxTotalSharesAtSponsor; /* highest share+loot count during any individual yes vote*/\n bool[4] status; /* [cancelled, processed, passed, actionFailed] */\n address sponsor; /* address of the sponsor - set at sponsor proposal - relevant for cancellation */\n bytes32 proposalDataHash; /*hash of raw data associated with state updates*/\n }\n\n /* Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n \\-> Cancelled \\-> Defeated */\n enum ProposalState {\n Unborn, /* 0 - can submit */\n Submitted, /* 1 - can sponsor -> voting */\n Voting, /* 2 - can be cancelled, otherwise proceeds to grace */\n Cancelled, /* 3 - terminal state, counts as processed */\n Grace, /* 4 - proceeds to ready/defeated */\n Ready, /* 5 - can be processed */\n Processed, /* 6 - terminal state */\n Defeated /* 7 - terminal state, yes votes <= no votes, counts as processed */\n }\n\n // MODIFIERS\n\n modifier baalOnly() {\n require(_msgSender() == avatar, \"!baal\");\n _;\n }\n\n modifier baalOrAdminOnly() {\n require(_msgSender() == avatar || isAdmin(_msgSender()), \"!baal & !admin\"); /*check `shaman` is admin*/\n _;\n }\n\n modifier baalOrManagerOnly() {\n require(\n _msgSender() == avatar || isManager(_msgSender()),\n \"!baal & !manager\"\n ); /*check `shaman` is manager*/\n _;\n }\n\n modifier baalOrGovernorOnly() {\n require(\n _msgSender() == avatar || isGovernor(_msgSender()),\n \"!baal & !governor\"\n ); /*check `shaman` is governor*/\n _;\n }\n\n // EVENTS\n event SetupComplete(\n bool lootPaused,\n bool sharesPaused,\n uint32 gracePeriod,\n uint32 votingPeriod,\n uint256 proposalOffering,\n uint256 quorumPercent,\n uint256 sponsorThreshold,\n uint256 minRetentionPercent,\n string name,\n string symbol,\n uint256 totalShares,\n uint256 totalLoot\n ); /*emits after Baal summoning*/\n event SubmitProposal(\n uint256 indexed proposal,\n bytes32 indexed proposalDataHash,\n uint256 votingPeriod,\n bytes proposalData,\n uint256 expiration,\n uint256 baalGas,\n bool selfSponsor,\n uint256 timestamp,\n string details\n ); /*emits after proposal is submitted*/\n event SponsorProposal(\n address indexed member,\n uint256 indexed proposal,\n uint256 indexed votingStarts\n ); /*emits after member has sponsored proposal*/\n event CancelProposal(uint256 indexed proposal); /*emits when proposal is cancelled*/\n event SubmitVote(\n address indexed member,\n uint256 balance,\n uint256 indexed proposal,\n bool indexed approved\n ); /*emits after vote is submitted on proposal*/\n event ProcessProposal(\n uint256 indexed proposal,\n bool passed,\n bool actionFailed\n ); /*emits when proposal is processed & executed*/\n event Ragequit(\n address indexed member,\n address to,\n uint256 indexed lootToBurn,\n uint256 indexed sharesToBurn,\n address[] tokens\n ); /*emits when users burn Baal `shares` and/or `loot` for given `to` account*/\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 amount\n ); /*emits when Baal `shares` are approved for pulls with erc20 accounting*/\n\n event ShamanSet(address indexed shaman, uint256 permission); /*emits when a shaman permission changes*/\n event SetTrustedForwarder(address indexed forwarder); /*emits when a trusted forwarder changes*/\n event GovernanceConfigSet(\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ); /*emits when gov config changes*/\n event SharesPaused(bool paused); /*emits when shares are paused or unpaused*/\n event LootPaused(bool paused); /*emits when loot is paused or unpaused*/\n event LockAdmin(bool adminLock); /*emits when admin is locked*/\n event LockManager(bool managerLock); /*emits when admin is locked*/\n event LockGovernor(bool governorLock); /*emits when admin is locked*/\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend)\n {\n bytes memory encodedActions;\n for (uint256 i = 0; i < _calls.length; i++) {\n encodedActions = abi.encodePacked(\n encodedActions,\n uint8(0),\n _target,\n uint256(0),\n uint256(_calls[i].length),\n bytes(_calls[i])\n );\n }\n encodedMultisend = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n encodedActions\n );\n }\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Summon Baal with voting configuration & initial array of `members` accounts with `shares` & `loot` weights.\n /// @param _initializationParams Encoded setup information.\n function setUp(bytes memory _initializationParams)\n public\n override(FactoryFriendly)\n initializer\n nonReentrant\n {\n (\n address _lootToken, /*loot ERC20 token*/\n address _sharesToken, /*shares ERC20 token*/\n address _multisendLibrary, /*address of multisend library*/\n address _avatar, /*Safe contract address*/\n address _forwarder, /*Trusted forwarder address for meta-transactions (EIP 2771)*/\n bytes memory _initializationMultisendData /*here you call BaalOnly functions to set up initial shares, loot, shamans, periods, etc.*/\n ) = abi.decode(\n _initializationParams,\n (address, address, address, address, address, bytes)\n );\n\n require(\n _multisendLibrary != address(0) &&\n _avatar != address(0),\n \"0 addr used\"\n );\n // no need to check _forwarder address exists, the default is address(0) for no forwarder\n\n versionRecipient = \"2.2.5+opengsn.payablewithbaal.irelayrecipient\";\n __Ownable_init();\n __ReentrancyGuard_init();\n __EIP712_init(\"Vote\", \"4\");\n transferOwnership(_avatar);\n\n // Set the Gnosis safe address\n avatar = _avatar;\n target = _avatar; /*Set target to same address as avatar on setup - can be changed later via setTarget, though probably not a good idea*/\n\n // Set trusted forwarder\n _setTrustedForwarder(_forwarder);\n\n lootToken = IBaalToken(_lootToken);\n sharesToken = IBaalToken(_sharesToken);\n\n /*Set address of Gnosis multisend library to use for all execution*/\n multisendLibrary = _multisendLibrary;\n\n // Execute all setups including but not limited to\n // * mint shares\n // * convert shares to loot\n // * set shamans\n // * set admin configurations\n require(\n exec(\n multisendLibrary,\n 0,\n _initializationMultisendData,\n Enum.Operation.DelegateCall\n ),\n \"call failure setup\"\n );\n\n emit SetupComplete(\n lootToken.paused(),\n sharesToken.paused(),\n gracePeriod,\n votingPeriod,\n proposalOffering,\n quorumPercent,\n sponsorThreshold,\n minRetentionPercent,\n sharesToken.name(),\n sharesToken.symbol(),\n totalShares(),\n totalLoot()\n );\n\n }\n\n /*****************\n PROPOSAL FUNCTIONS\n *****************/\n /// @notice Submit proposal to Baal `members` for approval within given voting period.\n /// @param proposalData Multisend encoded transactions or proposal data\n /// @param details Context for proposal.\n /// @return proposal Count for submitted proposal.\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable nonReentrant returns (uint256) {\n require(\n expiration == 0 ||\n expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n require(baalGas <= 20000000, \"baalGas to high\"); /* gwei 2/3 eth block limit */\n\n bool selfSponsor = false; /*plant sponsor flag*/\n if (sharesToken.getVotes(_msgSender()) >= sponsorThreshold ) {\n selfSponsor = true; /*if above sponsor threshold, self-sponsor*/\n } else {\n require(msg.value == proposalOffering, \"Baal requires an offering\"); /*Optional anti-spam gas token tribute*/\n (bool _success, ) = target.call{value: msg.value}(\"\"); /*Send ETH to sink*/\n require(_success, \"could not send\");\n }\n\n bytes32 proposalDataHash = hashOperation(proposalData); /*Store only hash of proposal data*/\n\n proposalCount++; /*increment proposal counter*/\n proposals[proposalCount] = Proposal( /*push params into proposal struct - start voting period timer if member submission*/\n proposalCount,\n selfSponsor ? latestSponsoredProposalId : 0, /* prevProposalId */\n selfSponsor ? uint32(block.timestamp) : 0, /* votingStarts */\n selfSponsor ? uint32(block.timestamp) + votingPeriod : 0, /* votingEnds */\n selfSponsor\n ? uint32(block.timestamp) + votingPeriod + gracePeriod\n : 0, /* graceEnds */\n expiration,\n baalGas,\n 0, /* yes votes */\n 0, /* no votes */\n selfSponsor ? totalSupply() : 0, /* maxTotalSharesAndLootAtVote */\n selfSponsor ? totalShares() : 0, /* maxTotalSharesAtSponsor */\n [false, false, false, false], /* [cancelled, processed, passed, actionFailed] */\n selfSponsor ? _msgSender() : address(0),\n proposalDataHash\n );\n\n if (selfSponsor) {\n latestSponsoredProposalId = proposalCount;\n }\n\n emit SubmitProposal(\n proposalCount,\n proposalDataHash,\n votingPeriod,\n proposalData,\n expiration,\n baalGas,\n selfSponsor,\n block.timestamp,\n details\n ); /*emit event reflecting proposal submission*/\n\n return proposalCount;\n }\n\n /// @notice Sponsor proposal to Baal `members` for approval within voting period.\n /// @param id Number of proposal in `proposals` mapping to sponsor.\n function sponsorProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n\n require(sharesToken.getVotes(_msgSender()) >= sponsorThreshold, \"!sponsor\"); /*check 'votes > threshold - required to sponsor proposal*/\n require(state(id) == ProposalState.Submitted, \"!submitted\");\n require(\n prop.expiration == 0 ||\n prop.expiration > block.timestamp + votingPeriod + gracePeriod,\n \"expired\"\n );\n\n prop.votingStarts = uint32(block.timestamp);\n\n unchecked {\n prop.votingEnds = uint32(block.timestamp) + votingPeriod;\n prop.graceEnds =\n uint32(block.timestamp) +\n votingPeriod +\n gracePeriod;\n }\n\n prop.prevProposalId = latestSponsoredProposalId;\n prop.sponsor = _msgSender();\n // snapshot both total supply and total shares\n prop.maxTotalSharesAndLootAtVote = totalSupply(); // updaed in votes for min retention\n prop.maxTotalSharesAtSponsor = totalShares(); // for yes vote quorum\n latestSponsoredProposalId = id;\n\n emit SponsorProposal(_msgSender(), id, block.timestamp);\n }\n\n /// @notice Submit vote - proposal must exist & voting period must not have ended.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function submitVote(uint32 id, bool approved) external nonReentrant {\n _submitVote(_msgSender(), id, approved);\n }\n\n /// @notice Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.\n /// @param voter Address of member who submitted vote.\n /// @param expiry Expiration of signature.\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n /// @param v v in signature\n /// @param r r in signature\n /// @param s s in signature\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external nonReentrant {\n require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n require(nonce == votingNonces[voter], \"!nonce\");\n\n /*calculate EIP-712 struct hash*/\n bytes32 structHash = keccak256(\n abi.encode(\n VOTE_TYPEHASH,\n keccak256(abi.encodePacked(sharesToken.name())),\n voter,\n expiry,\n nonce,\n id,\n approved\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n\n require(signer == voter, \"invalid signature\");\n require(signer != address(0), \"!signer\");\n votingNonces[voter] += 1;\n\n _submitVote(signer, id, approved);\n }\n\n /// @notice Execute vote submission internally - callable by submit vote or submit vote with signature\n /// @param voter Address of voter\n /// @param id Number of proposal in `proposals` mapping to cast vote on.\n /// @param approved If 'true', member will cast `yesVotes` onto proposal - if 'false', `noVotes` will be counted.\n function _submitVote(\n address voter,\n uint32 id,\n bool approved\n ) internal {\n Proposal storage prop = proposals[id]; /*alias proposal storage pointers*/\n require(state(id) == ProposalState.Voting, \"!voting\");\n\n uint256 balance = sharesToken.getPastVotes(voter, prop.votingStarts); /*fetch & gas-optimize voting weight at proposal creation time*/\n\n require(balance > 0, \"!member\"); /* check that user has shares*/\n require(!memberVoted[voter][id], \"voted\"); /*check vote not already cast*/\n\n memberVoted[voter][id] = true; /*record voting action to `members` struct per user account*/\n\n // get high water mark on all votes\n uint256 _totalSupply = totalSupply();\n if (_totalSupply > prop.maxTotalSharesAndLootAtVote) {\n prop.maxTotalSharesAndLootAtVote = _totalSupply;\n }\n\n unchecked {\n if (approved) {\n /*if `approved`, cast delegated balance `yesVotes` to proposal*/\n prop.yesVotes += balance; \n } else {\n /*otherwise, cast delegated balance `noVotes` to proposal*/\n prop.noVotes += balance;\n }\n }\n\n emit SubmitVote(voter, balance, id, approved); /*emit event reflecting vote*/\n }\n\n /// @notice Process `proposal` & execute internal functions.\n /// @dev Proposal must have succeeded, not been processed, not expired, retention threshold must be met\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n function processProposal(uint32 id, bytes calldata proposalData)\n external\n nonReentrant\n {\n Proposal storage prop = proposals[id]; /*alias `proposal` storage pointers*/\n\n require(prop.sponsor != address(0), \"!sponsor\"); /*check proposal has been sponsored*/\n require(state(id) == ProposalState.Ready, \"!ready\"); /* check proposal is Ready to process */\n\n ProposalState prevProposalState = state(prop.prevProposalId);\n require(\n prevProposalState == ProposalState.Processed ||\n prevProposalState == ProposalState.Cancelled ||\n prevProposalState == ProposalState.Defeated ||\n prevProposalState == ProposalState.Unborn,\n \"prev!processed\"\n );\n\n // check that the proposalData matches the stored hash\n require(\n hashOperation(proposalData) == prop.proposalDataHash,\n \"incorrect calldata\"\n );\n\n require(\n prop.baalGas == 0 || gasleft() >= prop.baalGas,\n \"not enough gas\"\n );\n\n prop.status[1] = true; /*Set processed flag to true*/\n bool okToExecute = true; /*Initialize and invalidate if conditions are not met below*/\n\n // Make proposal fail if after expiration\n if (prop.expiration != 0 && prop.expiration < block.timestamp)\n okToExecute = false;\n\n // Make proposal fail if it didn't pass quorum\n if (okToExecute && prop.yesVotes * 100 < quorumPercent * prop.maxTotalSharesAtSponsor)\n okToExecute = false;\n\n // Make proposal fail if the minRetentionPercent is exceeded\n if (\n okToExecute &&\n (totalSupply()) <\n (prop.maxTotalSharesAndLootAtVote * minRetentionPercent) / 100 /*Check for dilution since high water mark during voting*/\n ) {\n okToExecute = false;\n }\n\n /*check if `proposal` approved by simple majority of members*/\n if (okToExecute) {\n prop.status[2] = true; /*flag that proposal passed - allows baal-like extensions*/\n bool success = processActionProposal(proposalData); /*execute 'action'*/\n if (!success) {\n prop.status[3] = true;\n }\n }\n\n emit ProcessProposal(id, prop.status[2], prop.status[3]); /*emit event reflecting that given proposal processed*/\n }\n\n /// @notice Internal function to process 'action'[0] proposal.\n /// @param proposalData Packed multisend data to execute via Gnosis multisend library\n /// @return success Success or failure of execution\n function processActionProposal(bytes memory proposalData)\n private\n returns (bool success)\n {\n success = exec(\n multisendLibrary,\n 0,\n proposalData,\n Enum.Operation.DelegateCall\n );\n }\n\n /// @notice Cancel proposal prior to execution\n /// @dev Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold\n /// @param id Number of proposal in `proposals` mapping to process for execution.\n function cancelProposal(uint32 id) external nonReentrant {\n Proposal storage prop = proposals[id];\n require(state(id) == ProposalState.Voting, \"!voting\");\n require(\n _msgSender() == prop.sponsor ||\n sharesToken.getPastVotes(prop.sponsor, block.timestamp - 1) <\n sponsorThreshold ||\n isGovernor(_msgSender()),\n \"!cancellable\"\n );\n prop.status[0] = true;\n emit CancelProposal(id);\n }\n\n /// @dev Function to Execute arbitrary code as baal - useful if funds are accidentally sent here\n /// @notice Can only be called by the avatar which means this can only be called if passed by another\n /// proposal or by a delegated signer on the Safe\n /// @param _to address to call\n /// @param _value value to include in wei\n /// @param _data arbitrary transaction data\n function executeAsBaal(\n address _to,\n uint256 _value,\n bytes calldata _data\n ) external baalOnly {\n (bool success, ) = _to.call{value: _value}(_data);\n require(success, \"call failure execute\");\n }\n\n // ****************\n // MEMBER FUNCTIONS\n // ****************\n\n /// @notice Process member burn of `shares` and/or `loot` to claim 'fair share' of specified `tokens`\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] calldata tokens\n ) external nonReentrant {\n for (uint256 i = 1; i < tokens.length; i++) {\n require(tokens[i] > tokens[i - 1], \"!order\");\n }\n\n _ragequit(to, sharesToBurn, lootToBurn, tokens);\n }\n\n /// @notice Internal execution of rage quite\n /// @param to Account that receives 'fair share'.\n /// @param lootToBurn Baal pure economic weight to burn.\n /// @param sharesToBurn Baal voting weight to burn.\n /// @param tokens Array of tokens to include in rage quit calculation\n function _ragequit(\n address to,\n uint256 sharesToBurn,\n uint256 lootToBurn,\n address[] memory tokens\n ) internal {\n uint256 _totalSupply = totalSupply();\n\n if (lootToBurn != 0) {\n /*gas optimization*/\n _burnLoot(_msgSender(), lootToBurn); /*subtract `loot` from user account & Baal totals*/\n }\n\n if (sharesToBurn != 0) {\n /*gas optimization*/\n _burnShares(_msgSender(), sharesToBurn); /*subtract `shares` from user account & Baal totals with erc20 accounting*/\n }\n\n for (uint256 i = 0; i < tokens.length; i++) {\n uint256 balance;\n if(tokens[i] == ETH) {\n balance = address(target).balance;\n } else {\n (, bytes memory balanceData) = tokens[i].staticcall(\n abi.encodeWithSelector(0x70a08231, address(target))\n ); /*get Baal token balances - 'balanceOf(address)'*/\n balance = abi.decode(balanceData, (uint256));\n }\n\n uint256 amountToRagequit = ((lootToBurn + sharesToBurn) * balance) /\n _totalSupply; /*calculate 'fair shair' claims*/\n\n if (amountToRagequit != 0) {\n /*gas optimization to allow higher maximum token limit*/\n tokens[i] == ETH\n ? _safeTransferETH(to, amountToRagequit) /*execute 'safe' ETH transfer*/\n : _safeTransfer(tokens[i], to, amountToRagequit); /*execute 'safe' token transfer*/\n }\n }\n\n emit Ragequit(_msgSender(), to, lootToBurn, sharesToBurn, tokens); /*event reflects claims made against Baal*/\n }\n\n /*******************\n GUILD MGMT FUNCTIONS\n *******************/\n /// @notice Baal-only function to set shaman status.\n /// @param _shamans Addresses of shaman contracts\n /// @param _permissions Permission level of each shaman in _shamans\n function setShamans(\n address[] calldata _shamans,\n uint256[] calldata _permissions\n ) external baalOnly {\n require(_shamans.length == _permissions.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < _shamans.length; i++) {\n uint256 permission = _permissions[i];\n if (adminLock)\n require(\n permission != 1 &&\n permission != 3 &&\n permission != 5 &&\n permission != 7,\n \"admin lock\"\n );\n if (managerLock)\n require(\n permission != 2 &&\n permission != 3 &&\n permission != 6 &&\n permission != 7,\n \"manager lock\"\n );\n if (governorLock)\n require(\n permission != 4 &&\n permission != 5 &&\n permission != 6 &&\n permission != 7,\n \"governor lock\"\n );\n shamans[_shamans[i]] = permission;\n emit ShamanSet(_shamans[i], permission);\n }\n }\n\n /// @notice Lock admin so setShamans cannot be called with admin changes\n function lockAdmin() external baalOnly {\n adminLock = true;\n\n emit LockAdmin(adminLock);\n }\n\n /// @notice Lock manager so setShamans cannot be called with manager changes\n function lockManager() external baalOnly {\n managerLock = true;\n\n emit LockManager(managerLock);\n }\n\n /// @notice Lock governor so setShamans cannot be called with governor changes\n function lockGovernor() external baalOnly {\n governorLock = true;\n\n emit LockGovernor(governorLock);\n }\n\n // ****************\n // SHAMAN FUNCTIONS\n // ****************\n /// @notice Baal-or-admin-only function to set admin config (pause/unpause shares/loot) and call function on token\n /// @param pauseShares Turn share transfers on or off\n /// @param pauseLoot Turn loot transfers on or off\n function setAdminConfig(bool pauseShares, bool pauseLoot)\n external\n baalOrAdminOnly\n {\n\n if(pauseShares && !sharesToken.paused()){\n sharesToken.pause();\n emit SharesPaused(true);\n } else if(!pauseShares && sharesToken.paused()){\n sharesToken.unpause();\n emit SharesPaused(false);\n }\n\n if(pauseLoot && !lootToken.paused()){\n lootToken.pause();\n emit LootPaused(true);\n } else if(!pauseLoot && lootToken.paused()){\n lootToken.unpause();\n emit LootPaused(false);\n }\n }\n\n /// @notice Baal-or-manager-only function to mint shares.\n /// @param to Array of addresses to receive shares\n /// @param amount Array of amounts to mint\n function mintShares(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintShares(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `shares`.\n /// @param to Address to receive shares\n /// @param shares Amount to mint\n function _mintShares(address to, uint256 shares) private {\n sharesToken.mint(to, shares);\n }\n\n /// @notice Baal-or-manager-only function to burn shares.\n /// @param from Array of addresses to lose shares\n /// @param amount Array of amounts to burn\n function burnShares(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnShares(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `shares`.\n /// @param from Address to lose shares\n /// @param shares Amount to burn\n function _burnShares(address from, uint256 shares) private {\n sharesToken.burn(from, shares);\n }\n\n /// @notice Baal-or-manager-only function to mint loot.\n /// @param to Array of addresses to mint loot\n /// @param amount Array of amounts to mint\n function mintLoot(address[] calldata to, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(to.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < to.length; i++) {\n _mintLoot(to[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Minting function for Baal `loot`.\n /// @param to Address to mint loot\n /// @param loot Amount to mint\n function _mintLoot(address to, uint256 loot) private {\n lootToken.mint(to, loot);\n }\n\n /// @notice Baal-or-manager-only function to burn loot.\n /// @param from Array of addresses to lose loot\n /// @param amount Array of amounts to burn\n function burnLoot(address[] calldata from, uint256[] calldata amount)\n external\n baalOrManagerOnly\n {\n require(from.length == amount.length, \"!array parity\"); /*check array lengths match*/\n for (uint256 i = 0; i < from.length; i++) {\n _burnLoot(from[i], amount[i]); /*grant `to` `amount` `shares`*/\n }\n }\n\n /// @notice Burn function for Baal `loot`.\n /// @param from Address to lose loot\n /// @param loot Amount to burn\n function _burnLoot(address from, uint256 loot) private {\n lootToken.burn(from, loot);\n }\n\n /// @notice Baal-or-governance-only function to change periods.\n /// @param _governanceConfig Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound\n function setGovernanceConfig(bytes memory _governanceConfig)\n external\n baalOrGovernorOnly\n {\n (\n uint32 voting,\n uint32 grace,\n uint256 newOffering,\n uint256 quorum,\n uint256 sponsor,\n uint256 minRetention\n ) = abi.decode(\n _governanceConfig,\n (uint32, uint32, uint256, uint256, uint256, uint256)\n );\n require(quorum >= 0 && minRetention <= 100, 'bad quorum');\n require(minRetention >= 0 && minRetention <= 100, 'bad minRetention');\n\n // on initialization of governance config, there is no shares token\n // skip this check on initialization of governance config.\n if (sponsorThreshold > 0 && address(sharesToken) != address(0)) {\n require(sponsor <= totalShares(), 'sponsor > sharesSupply');\n }\n\n if (voting != 0) votingPeriod = voting; /*if positive, reset min. voting periods to first `value`*/\n if (grace != 0) gracePeriod = grace; /*if positive, reset grace period to second `value`*/\n proposalOffering = newOffering; /*set new proposal offering amount */\n quorumPercent = quorum;\n sponsorThreshold = sponsor;\n minRetentionPercent = minRetention;\n\n emit GovernanceConfigSet(\n voting,\n grace,\n newOffering,\n quorum,\n sponsor,\n minRetention\n );\n }\n\n /// @notice Baal-or-governance only function to set trusted forwarder for meta-transactions.\n /// @param _trustedForwarderAddress Trusted forwarder's address\n function setTrustedForwarder(address _trustedForwarderAddress)\n external\n baalOrGovernorOnly\n {\n _setTrustedForwarder(_trustedForwarderAddress);\n emit SetTrustedForwarder(_trustedForwarderAddress);\n }\n\n /***************\n GETTER FUNCTIONS\n ***************/\n /// @notice State helper to determine proposal state\n /// @param id Number of proposal in proposals\n /// @return Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed\n /// \\-> Cancelled \\-> Defeated\n function state(uint32 id) public view returns (ProposalState) {\n Proposal memory prop = proposals[id];\n if (prop.id == 0) {\n /*Uninitialized state*/\n return ProposalState.Unborn;\n } else if (\n prop.status[0] /* cancelled */\n ) {\n return ProposalState.Cancelled;\n } else if (\n prop.votingStarts == 0 /*Voting has not started*/\n ) {\n return ProposalState.Submitted;\n } else if (\n block.timestamp <= prop.votingEnds /*Voting in progress*/\n ) {\n return ProposalState.Voting;\n } else if (\n block.timestamp <= prop.graceEnds /*Proposal in grace period*/\n ) {\n return ProposalState.Grace;\n } else if (\n prop.noVotes >= prop.yesVotes /*Voting has concluded and failed to pass*/\n ) {\n return ProposalState.Defeated;\n } else if (\n prop.status[1] /* processed */\n ) {\n return ProposalState.Processed;\n }\n /* Proposal is ready to be processed*/\n else {\n return ProposalState.Ready;\n }\n }\n\n /// @notice Helper to get recorded proposal flags\n /// @param id Number of proposal in proposals\n /// @return [cancelled, processed, passed, actionFailed]\n function getProposalStatus(uint32 id)\n external\n view\n returns (bool[4] memory)\n {\n return proposals[id].status;\n }\n\n /// @notice Helper to check if shaman permission contains admin capabilities\n /// @param shaman Address attempting to execute admin permissioned functions\n function isAdmin(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 1 ||\n permission == 3 ||\n permission == 5 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains manager capabilities\n /// @param shaman Address attempting to execute manager permissioned functions\n function isManager(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 2 ||\n permission == 3 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check if shaman permission contains governor capabilities\n /// @param shaman Address attempting to execute governor permissioned functions\n function isGovernor(address shaman) public view returns (bool) {\n uint256 permission = shamans[shaman];\n return (permission == 4 ||\n permission == 5 ||\n permission == 6 ||\n permission == 7);\n }\n\n /// @notice Helper to check total supply of child loot contract\n function totalLoot() public view returns (uint256) {\n return lootToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of child shares contract\n function totalShares() public view returns (uint256) {\n return sharesToken.totalSupply();\n }\n\n /// @notice Helper to check total supply of loot and shares\n function totalSupply() public view returns (uint256) {\n return totalLoot() + totalShares();\n }\n\n /***************\n HELPER FUNCTIONS\n ***************/\n /// @notice Returns the keccak256 hash of calldata\n function hashOperation(bytes memory _transactions)\n public\n pure\n virtual\n returns (bytes32 hash)\n {\n return keccak256(abi.encode(_transactions));\n }\n\n /// @notice Provides 'safe' {transfer} for ETH.\n function _safeTransferETH(address to, uint256 amount) internal {\n // transfer eth from target\n (bool success, ) = execAndReturnData(\n to,\n amount,\n \"\",\n Enum.Operation.Call\n );\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n\n /// @notice Provides 'safe' {transfer} for tokens that do not consistently return 'true/false'.\n function _safeTransfer(\n address token,\n address to,\n uint256 amount\n ) private {\n (bool success, bytes memory data) = execAndReturnData(\n token,\n 0,\n abi.encodeWithSelector(0xa9059cbb, to, amount),\n Enum.Operation.Call\n ); /*'transfer(address,uint)'*/\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"transfer failed\"\n ); /*checks success & allows non-conforming transfers*/\n }\n\n /// @notice Provides access to message sender of a meta transaction (EIP-2771)\n function _msgSender() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (address sender) {\n sender = BaseRelayRecipient._msgSender();\n }\n\n /// @notice Provides access to message data of a meta transaction (EIP-2771)\n function _msgData() internal view override(ContextUpgradeable, BaseRelayRecipient)\n returns (bytes calldata) {\n return BaseRelayRecipient._msgData();\n }\n}\n" + }, + "contracts/fixtures/GnosisImports.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.8.7;\n\nimport \"@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/examples/libraries/SignMessage.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\nimport \"@gnosis.pm/safe-contracts/contracts/handler/CompatibilityFallbackHandler.sol\"; //https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol\n" + }, + "contracts/higherOrderFactories/BaalAdvTokenSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.sol\";\nimport \"@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol\";\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../Baal.sol\";\nimport \"../interfaces/IBaalSummoner.sol\";\n\ncontract BaalAdvTokenSummoner is\n Initializable,\n OwnableUpgradeable,\n UUPSUpgradeable\n{\n IBaalSummoner public _baalSummoner;\n\n event setSummoner(address summoner);\n\n event DeployBaalTokens(address lootToken, address sharesToken);\n\n constructor() {\n _disableInitializers();\n }\n\n function initialize() public initializer {\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n /**\n * @dev Sets the address of the BaalSummoner contract\n * @param baalSummoner The address of the BaalSummoner contract\n */\n function setSummonerAddr(address baalSummoner) public onlyOwner {\n require(baalSummoner != address(0), \"zero address\");\n _baalSummoner = IBaalSummoner(baalSummoner);\n emit setSummoner(baalSummoner);\n }\n\n /**\n * @dev Summon a new Baal contract with a new set of tokens\n * @param _safeAddr The address of the Gnosis Safe to be used as the treausry, 0x0 if new Safe\n * @param _forwarderAddr The address of the forwarder to be used, 0x0 if not set\n * @param _saltNonce The salt nonce to be used for the Safe contract\n * @param initializationMintParams The parameters for minting the tokens\n * @param initializationTokenParams The parameters for deploying the tokens\n * @param postInitializationActions The actions to be performed after the initialization\n */\n function summonBaalFromReferrer(\n address _safeAddr,\n address _forwarderAddr,\n uint256 _saltNonce,\n bytes calldata initializationMintParams,\n bytes calldata initializationTokenParams,\n bytes[] calldata postInitializationActions\n ) external {\n // summon tokens\n (address _lootToken, address _sharesToken) = deployTokens(\n initializationTokenParams\n );\n\n // mint shares loot tokens\n mintTokens(initializationMintParams, _lootToken, _sharesToken);\n\n // summon baal with new tokens\n address _baal = _baalSummoner.summonBaalFromReferrer(\n abi.encode(\n IBaalToken(_sharesToken).name(), \n IBaalToken(_sharesToken).symbol(),\n _safeAddr,\n _forwarderAddr,\n _lootToken,\n _sharesToken\n ),\n postInitializationActions,\n _saltNonce,\n bytes32(bytes(\"DHAdvTokenSummoner\")) // referrer\n );\n\n // change token ownership to baal\n IBaalToken(_lootToken).transferOwnership(address(_baal));\n IBaalToken(_sharesToken).transferOwnership(address(_baal));\n }\n\n /**\n * @dev mintTokens\n * @param initializationTokens The parameters for minting the tokens\n * @param _lootToken The loot token address\n * @param _sharesToken The shares token address\n */\n function mintTokens(\n bytes calldata initializationTokens,\n address _lootToken,\n address _sharesToken\n ) internal {\n (\n address[] memory summoners, // The address to mint initial tokens to\n uint256[] memory summonerShares, // The amount of shares to mint\n uint256[] memory summonerLoot // The amount of loot to mint\n ) = abi.decode(initializationTokens, (address[], uint256[], uint256[]));\n\n require(\n summoners.length == summonerShares.length &&\n summoners.length == summonerLoot.length,\n \"!array parity\"\n ); /*check array lengths match*/\n\n for (uint256 i = 0; i < summoners.length; i++) {\n if (summonerLoot[i] > 0) {\n IBaalToken(_lootToken).mint(\n summoners[i],\n summonerLoot[i]\n ); /*grant `to` `amount` `loot`*/\n }\n if (summonerShares[i] > 0) {\n IBaalToken(_sharesToken).mint(\n summoners[i],\n summonerShares[i]\n ); /*grant `to` `amount` `shares`*/\n }\n }\n }\n\n /**\n * @dev deployTokens\n * @param initializationParams The parameters for deploying the tokens\n */\n function deployTokens(\n bytes calldata initializationParams\n ) internal returns (address lootToken, address sharesToken) {\n (\n string\n memory _name /*_name Name for erc20 `shares` accounting, empty if token */,\n string\n memory _symbol /*_symbol Symbol for erc20 `shares` accounting, empty if token*/,\n string\n memory _lootName /* name for erc20 `loot` accounting, empty if token */,\n string\n memory _lootSymbol /* symbol for erc20 `loot` accounting, empty if token*/,\n bool _transferableShares /* if shares is transferable */,\n bool _transferableLoot /* if loot is transferable */\n ) = abi.decode(\n initializationParams,\n (string, string, string, string, bool, bool)\n );\n\n address lootSingleton = _baalSummoner.lootSingleton();\n address sharesSingleton = _baalSummoner.sharesSingleton();\n\n lootToken = address(\n new ERC1967Proxy(\n lootSingleton,\n abi.encodeWithSelector(\n IBaalToken(lootSingleton).setUp.selector,\n _lootName,\n _lootSymbol\n )\n )\n );\n\n sharesToken = address(\n new ERC1967Proxy(\n sharesSingleton,\n abi.encodeWithSelector(\n IBaalToken(sharesSingleton).setUp.selector,\n _name,\n _symbol\n )\n )\n );\n if (!_transferableShares) {\n IBaalToken(sharesToken).pause();\n }\n if (!_transferableLoot) {\n IBaalToken(lootToken).pause();\n }\n\n emit DeployBaalTokens(lootToken, sharesToken);\n }\n\n function _authorizeUpgrade(\n address newImplementation\n ) internal override onlyOwner {}\n}\n" + }, + "contracts/higherOrderFactories/BaalAndVaultSummoner.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../interfaces/IBaalSummoner.sol\";\n\n/*\nSummon new 'non-ragequitable' treasury Safe (Vaults). (sidecar?)\nCan summon a dao with a new Vault.\nCan summon a new vault for a dao after initial dao setup.\nActs as a register and the owner of the contract or DAO can deactivate\nregister is primarily a helper for UIs\nOwner of the contract can add new vaults, and set current vaults\nContract is upgradable and should be owned by a DAO\n*/\ncontract BaalAndVaultSummoner is Initializable, OwnableUpgradeable, UUPSUpgradeable {\n\n IBaalSummoner public _baalSummoner;\n uint256 public vaultIdx;\n\n struct Vault{\n uint256 id;\n bool active;\n address daoAddress;\n address vaultAddress;\n string name;\n }\n mapping(uint256 => Vault) public vaults;\n mapping(address => address) public delegates;\n\n event SetVault(\n Vault vault\n );\n\n event SetDelegate(\n address daoAddress,\n address delegate\n );\n\n event setSummoner(\n address summoner\n );\n\n function initialize() initializer public {\n __Ownable_init();\n __UUPSUpgradeable_init();\n vaultIdx = 0;\n }\n\n function setSummonerAddr(\n address baalSummoner\n ) public onlyOwner {\n require(baalSummoner != address(0), \"zero address\");\n _baalSummoner = IBaalSummoner(baalSummoner);\n emit setSummoner(baalSummoner);\n }\n\n /** Summon a new baal and add a Vault */\n function summonBaalAndVault(\n bytes calldata initializationParams,\n bytes[] calldata initializationActions,\n uint256 saltNonce,\n bytes32 referrer,\n string memory name\n ) external returns (address _daoAddress, address _vaultAddress) {\n _daoAddress = _baalSummoner.summonBaalFromReferrer(\n initializationParams,\n initializationActions,\n saltNonce,\n referrer\n );\n _vaultAddress = summonVault(_daoAddress, name);\n }\n\n /** create and add a Vault(Safe) to an existing DAO */\n function summonVault(\n address daoAddress,\n string memory name\n ) public returns (address _vaultAddress) {\n _vaultAddress = _baalSummoner.deployAndSetupSafe(\n daoAddress\n );\n _setNewVault(name, daoAddress, _vaultAddress);\n }\n\n /** set a Vault as active or not on existing dao (owner only) */\n // Admin functions to help maintain the registry.\n function setVault(\n uint256 id,\n bool active\n ) public onlyOwner\n {\n _setVault(id, active);\n }\n\n /** set a new Vault as active on existing dao (owner only) */\n // Admin functions to help maintain the registry.\n function setNewVault(\n address daoAddress, \n address vaultAddress,\n string memory name\n ) public onlyOwner\n {\n _setNewVault(name, daoAddress, vaultAddress);\n }\n\n /** \n A DAO can set a Vault as inactive \n */\n function deactivateVaultAsDao(\n uint256 id,\n address daoAddress\n ) external\n {\n require(msg.sender == daoAddress || msg.sender == delegates[daoAddress], \"not DAO or delegate\");\n require(vaults[id].daoAddress == daoAddress && vaults[id].active,\"!not active DAO vault\");\n _setVault(id, false);\n }\n\n /** Allow a Dao to set a delegate that can manage vault enteries */\n function setDelegate(\n address daoAddress,\n address delegate\n ) external\n {\n require(msg.sender == daoAddress, \"!DAO\");\n delegates[daoAddress] = delegate;\n emit SetDelegate(daoAddress, delegate);\n }\n\n\n function _setVault(\n uint256 id, \n bool active\n ) internal \n {\n vaults[id].active = active;\n emit SetVault(vaults[id]);\n }\n\n function _setNewVault(\n string memory name,\n address daoAddress, \n address vaultAddress\n ) internal \n {\n vaultIdx += 1;\n vaults[vaultIdx] = Vault(vaultIdx, true, daoAddress, vaultAddress, name);\n emit SetVault(vaults[vaultIdx]);\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n onlyOwner\n override\n {}\n}\n" + }, + "contracts/interfaces/IBaal.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaal {\n function lootToken() external view returns (address);\n function sharesToken() external view returns (address);\n function votingPeriod() external view returns (uint32);\n function gracePeriod() external view returns (uint32);\n function proposalCount() external view returns (uint32);\n function proposalOffering() external view returns (uint256);\n function quorumPercent() external view returns (uint256);\n function sponsorThreshold() external view returns (uint256);\n function minRetentionPercent() external view returns (uint256);\n function latestSponsoredProposalId() external view returns (uint32);\n\n function setUp(bytes memory initializationParams) external;\n function multisendLibrary() external view returns (address);\n // Module\n function avatar() external view returns (address);\n function target() external view returns (address);\n function setAvatar(address avatar) external;\n function setTarget(address avatar) external;\n // BaseRelayRecipient\n function trustedForwarder() external view returns (address);\n function setTrustedForwarder(address trustedForwarderAddress) external;\n\n function mintLoot(address[] calldata to, uint256[] calldata amount) external;\n function burnLoot(address[] calldata from, uint256[] calldata amount) external;\n function mintShares(address[] calldata to, uint256[] calldata amount) external;\n function burnShares(address[] calldata from, uint256[] calldata amount) external;\n function totalLoot() external view returns (uint256);\n function totalShares() external view returns (uint256);\n function totalSupply() external view returns (uint256);\n function lootPaused() external view returns (bool);\n function sharesPaused() external view returns (bool);\n \n function shamans(address shaman) external view returns (uint256);\n function setShamans(address[] calldata shamans, uint256[] calldata permissions) external;\n function isAdmin(address shaman) external view returns (bool);\n function isManager(address shaman) external view returns (bool);\n function isGovernor(address shaman) external view returns (bool);\n function lockAdmin() external;\n function lockManager() external;\n function lockGovernor() external;\n function adminLock() external view returns (bool);\n function managerLock() external view returns (bool);\n function governorLock() external view returns (bool);\n function setAdminConfig(bool pauseShares, bool pauseLoot) external;\n function setGovernanceConfig(bytes memory governanceConfig) external;\n\n function submitProposal(\n bytes calldata proposalData,\n uint32 expiration,\n uint256 baalGas,\n string calldata details\n ) external payable returns (uint256);\n function sponsorProposal(uint32 id) external;\n function processProposal(uint32 id, bytes calldata proposalData) external;\n function cancelProposal(uint32 id) external;\n function getProposalStatus(uint32 id) external returns (bool[4] memory);\n function submitVote(uint32 id, bool approved) external;\n function submitVoteWithSig(\n address voter,\n uint256 expiry,\n uint256 nonce,\n uint32 id,\n bool approved,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n function executeAsBaal(address to, uint256 value, bytes calldata data) external;\n function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] calldata tokens) external;\n\n function hashOperation(bytes memory transactions) external pure returns (bytes32);\n function encodeMultisend(bytes[] memory calls, address target) external pure returns (bytes memory);\n}\n" + }, + "contracts/interfaces/IBaalSummoner.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalSummoner {\n event AdminChanged(address previousAdmin, address newAdmin);\n event BeaconUpgraded(address indexed beacon);\n event DaoReferral(bytes32 referrer, address daoAddress);\n event DeployBaalSafe(address baalSafe, address moduleAddr);\n event DeployBaalTokens(address lootToken, address sharesToken);\n event Initialized(uint8 version);\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n event SetAddrsVersion(uint256 version);\n event SummonBaal(\n address indexed baal,\n address indexed loot,\n address indexed shares,\n address safe,\n address forwarder,\n uint256 existingAddrs\n );\n event Upgraded(address indexed implementation);\n\n function setAddrs(\n address _template,\n address _gnosisSingleton,\n address _gnosisFallbackLibrary,\n address _gnosisMultisendLibrary,\n address _gnosisSafeProxyFactory,\n address _moduleProxyFactory,\n address _lootSingleton,\n address _sharesSingleton\n ) external;\n\n function initialize() external;\n\n function transferOwnership(address newOwner) external;\n function upgradeTo(address newImplementation) external;\n function upgradeToAndCall(address newImplementation, bytes memory data) external payable;\n function renounceOwnership() external;\n\n function summonBaal(bytes memory initializationParams, bytes[] memory initializationActions, uint256 _saltNonce)\n external\n returns (address);\n function summonBaalFromReferrer(\n bytes memory initializationParams,\n bytes[] memory initializationActions,\n uint256 _saltNonce,\n bytes32 referrer\n ) external payable returns (address);\n\n function deployAndSetupSafe(address _moduleAddr) external returns (address);\n function deployTokens(string memory _name, string memory _symbol)\n external\n returns (address lootToken, address sharesToken);\n\n function encodeMultisend(bytes[] memory _calls, address _target)\n external\n pure\n returns (bytes memory encodedMultisend);\n function addrsVersion() external view returns (uint256);\n function gnosisFallbackLibrary() external view returns (address);\n function gnosisMultisendLibrary() external view returns (address);\n function gnosisSingleton() external view returns (address);\n function lootSingleton() external view returns (address);\n function sharesSingleton() external view returns (address);\n function owner() external view returns (address);\n function proxiableUUID() external view returns (bytes32);\n function template() external view returns (address);\n}\n" + }, + "contracts/interfaces/IBaalToken.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.7;\n\ninterface IBaalToken {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function setUp(string memory _name, string memory _symbol) external;\n\n function mint(address recipient, uint256 amount) external;\n\n function burn(address account, uint256 amount) external;\n\n function pause() external;\n\n function unpause() external;\n\n function paused() external view returns (bool);\n \n function transferOwnership(address newOwner) external;\n\n function owner() external view returns (address);\n\n function balanceOf(address account) external view returns (uint256);\n\n function totalSupply() external view returns (uint256);\n\n function snapshot() external returns(uint256);\n\n function getCurrentSnapshotId() external returns(uint256);\n\n function balanceOfAt(address account, uint256 snapshotId) external view returns (uint256);\n\n function totalSupplyAt(uint256 snapshotId) external view returns (uint256);\n\n // below is shares token specific\n struct Checkpoint {\n uint32 fromTimePoint;\n uint256 votes;\n }\n\n function getPastVotes(address account, uint256 timePoint) external view returns (uint256);\n\n function numCheckpoints(address) external view returns (uint256);\n\n function getCheckpoint(address, uint256)\n external\n view\n returns (Checkpoint memory);\n\n function getVotes(address account) external view returns (uint256);\n\n function delegates(address account) external view returns (address);\n\n function delegationNonces(address account) external view returns (uint256);\n\n function delegate(address delegatee) external;\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "contracts/LootERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\ncontract Loot is\n ERC20SnapshotUpgradeable,\n ERC20PermitUpgradeable,\n PausableUpgradeable,\n OwnableUpgradeable,\n UUPSUpgradeable\n{\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure loot - called by Baal on summon\n /// @dev initializer should prevent this from being called again\n /// @param name_ Name for ERC20 token trackers\n /// @param symbol_ Symbol for ERC20 token trackers\n function setUp(string memory name_, string memory symbol_)\n external\n initializer\n {\n require(bytes(name_).length != 0, \"loot: name empty\");\n require(bytes(symbol_).length != 0, \"loot: symbol empty\");\n\n __ERC20_init(name_, symbol_);\n __ERC20Permit_init(name_);\n __Pausable_init();\n __ERC20Snapshot_init();\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n /// @notice Allows baal to create a snapshot\n function snapshot() external onlyOwner returns(uint256) {\n return _snapshot();\n }\n\n /// @notice get current SnapshotId\n function getCurrentSnapshotId() external view returns (uint256) {\n return _getCurrentSnapshotId();\n }\n\n /// @notice Baal-only function to pause shares.\n function pause() public onlyOwner {\n _pause();\n }\n\n /// @notice Baal-only function to pause shares.\n function unpause() public onlyOwner {\n _unpause();\n }\n\n /// @notice Baal-only function to mint loot.\n /// @param recipient Address to receive loot\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n // can not be more than half the max because of totalsupply of loot and shares\n require(totalSupply() + amount <= type(uint256).max / 2, \"loot: cap exceeded\");\n _mint(recipient, amount);\n }\n\n /// @notice Baal-only function to burn loot.\n /// @param account Address to lose loot\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice Internal hook to restrict token transfers unless allowed by baal\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `loot` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20Upgradeable, ERC20SnapshotUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n require(\n from == address(0) || /*Minting allowed*/\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\n !paused(),\n \"loot: !transferable\"\n );\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/mock/BaalLessToken.sol": { + "content": "pragma solidity 0.8.7;\n//SPDX-License-Identifier: MIT\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport \"../utils/BaalVotes.sol\";\nimport \"../interfaces/IBaal.sol\";\n\n// import \"hardhat/console.sol\";\n\n/// @title Shares\n/// @notice Accounting for Baal non voting shares\ncontract BaalLessShares is BaalVotes, OwnableUpgradeable, UUPSUpgradeable {\n // Baal Config\n IBaal public baal;\n uint8 public version;\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure shares - called by Baal on summon\n /// @param _version new version\n function setUp(uint8 _version)\n external\n reinitializer(_version)\n {\n baal = IBaal(address(0)); /*Configure Baal to setup sender*/\n version = _version;\n __Ownable_init();\n __UUPSUpgradeable_init();\n }\n\n\n /// @notice owner-only function to mint shares.\n /// @param recipient Address to receive shares\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n unchecked {\n if (totalSupply() + amount <= type(uint256).max / 2) {\n _mint(recipient, amount);\n }\n }\n }\n\n /// @notice owner-only function to burn shares.\n /// @param account Address to lose shares\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice new before transfer\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `shares` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(BaalVotes) {\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/mock/MockBaal.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\nimport \"@openzeppelin/contracts/proxy/Clones.sol\";\n\nimport \"../Baal.sol\";\n\ncontract MockBaal {\n bool public lootPaused;\n IBaalToken public lootToken; /*Sub ERC20 for loot mgmt*/\n\n constructor(\n address payable _lootSingleton,\n string memory _name,\n string memory _symbol\n ) {\n /*Clone loot singleton using EIP1167 minimal proxy pattern*/\n lootToken = IBaalToken(Clones.clone(_lootSingleton));\n lootToken.setUp(\n string(abi.encodePacked(_name, \" LOOT\")),\n string(abi.encodePacked(_symbol, \"-LOOT\"))\n );\n }\n\n function setLootPaused(bool paused) external {\n if(!lootToken.paused() && paused){\n lootToken.pause();\n } else if(lootToken.paused() && !paused){\n lootToken.unpause();\n }\n lootPaused = paused;\n }\n\n function mintLoot(address _to, uint256 _amount) external {\n lootToken.mint(_to, _amount);\n }\n\n function burnLoot(address _from, uint256 _amount) external {\n lootToken.burn(_from, _amount);\n }\n}\n" + }, + "contracts/mock/TestAvatar.sol": { + "content": "// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity 0.8.7;\n\ncontract Enum {\n enum Operation {\n Call,\n DelegateCall\n }\n}\n\ncontract TestAvatar {\n address public module;\n\n receive() external payable {}\n\n function enableModule(address _module) external {\n module = _module;\n }\n\n function disableModule(address, address) external {\n module = address(0);\n }\n\n function isModuleEnabled(address _module) external view returns (bool) {\n if (module == _module) {\n return true;\n } else {\n return false;\n }\n }\n\n function execTransactionFromModule(\n address payable to,\n uint256 value,\n bytes calldata data,\n uint8 operation\n ) external returns (bool success) {\n require(msg.sender == module, \"Not authorized\");\n if (operation == 1) (success, ) = to.delegatecall(data);\n else (success, ) = to.call{value: value}(data);\n }\n\n function execTransactionFromModuleReturnData(\n address payable to,\n uint256 value,\n bytes calldata data,\n uint8 operation\n ) external returns (bool success, bytes memory returnData) {\n require(msg.sender == module, \"Not authorized\");\n if (operation == 1) (success, ) = to.delegatecall(data);\n else (success, returnData) = to.call{value: value}(data);\n }\n\n function getModulesPaginated(address, uint256 pageSize)\n external\n view\n returns (address[] memory array, address next)\n {\n // Init array with max page size\n array = new address[](pageSize);\n\n array[0] = module;\n next = module;\n }\n}\n" + }, + "contracts/mock/TestERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\n\n/// @notice Basic ERC20 implementation.\ncontract TestERC20 {\n string public name;\n string public symbol;\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n constructor(string memory _name, string memory _symbol, uint256 _totalSupply) {\n name = _name;\n symbol = _symbol;\n totalSupply = _totalSupply;\n balanceOf[msg.sender] = _totalSupply;\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n function approve(address to, uint256 amount) external returns (bool) {\n allowance[msg.sender][to] = amount;\n emit Approval(msg.sender, to, amount);\n return true;\n }\n\n function transfer(address to, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] -= amount;\n balanceOf[to] += amount;\n emit Transfer(msg.sender, to, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool) {\n if (allowance[from][msg.sender] != type(uint256).max)\n allowance[from][msg.sender] -= amount;\n\n balanceOf[from] -= amount;\n balanceOf[to] += amount;\n emit Transfer(from, to, amount);\n return true;\n }\n}\n" + }, + "contracts/SharesERC20.sol": { + "content": "pragma solidity 0.8.7;\n//SPDX-License-Identifier: MIT\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol\";\n\nimport \"./utils/BaalVotes.sol\";\nimport \"./interfaces/IBaal.sol\";\n\n// import \"hardhat/console.sol\";\n\n/// @title Shares\n/// @notice Accounting for Baal non voting shares\ncontract Shares is BaalVotes, ERC20SnapshotUpgradeable, OwnableUpgradeable, PausableUpgradeable, UUPSUpgradeable {\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Configure shares - called by Baal on summon\n /// @dev initializer should prevent this from being called again\n /// @param name_ Name for ERC20 token trackers\n /// @param symbol_ Symbol for ERC20 token trackers\n function setUp(string memory name_, string memory symbol_)\n external\n initializer\n {\n require(bytes(name_).length != 0, \"shares: name empty\");\n require(bytes(symbol_).length != 0, \"shares: symbol empty\");\n\n __ERC20_init(name_, symbol_);\n __ERC20Permit_init(name_);\n __Pausable_init();\n __ERC20Snapshot_init();\n __Ownable_init();\n __UUPSUpgradeable_init();\n __EIP712_init_delegation(\"delegation\", \"4\");\n\n\n }\n\n /// @notice Baal-only function to pause shares.\n function pause() public onlyOwner {\n _pause();\n }\n\n /// @notice Baal-only function to unpause shares.\n function unpause() public onlyOwner {\n _unpause();\n }\n\n /// @notice Allows baal to create a snapshot\n function snapshot() external onlyOwner returns(uint256) {\n return _snapshot();\n }\n\n /// @notice get current SnapshotId\n function getCurrentSnapshotId() external view returns (uint256) {\n return _getCurrentSnapshotId();\n }\n\n /// @notice Baal-only function to mint shares.\n /// @param recipient Address to receive shares\n /// @param amount Amount to mint\n function mint(address recipient, uint256 amount) external onlyOwner {\n // can not be more than half the max because of totalsupply of loot and shares\n require(totalSupply() + amount <= type(uint256).max / 2, \"shares: cap exceeded\");\n _mint(recipient, amount);\n }\n\n /// @notice Baal-only function to burn shares.\n /// @param account Address to lose shares\n /// @param amount Amount to burn\n function burn(address account, uint256 amount) external onlyOwner {\n _burn(account, amount);\n }\n\n /// @notice Internal hook to restrict token transfers unless allowed by baal\n /// @dev Allows transfers if msg.sender is Baal which enables minting and burning\n /// @param from The address of the source account.\n /// @param to The address of the destination account.\n /// @param amount The number of `shares` tokens to transfer.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(BaalVotes, ERC20SnapshotUpgradeable) {\n super._beforeTokenTransfer(from, to, amount);\n require(\n from == address(0) || /*Minting allowed*/\n (msg.sender == owner() && to == address(0)) || /*Burning by Baal allowed*/\n !paused(),\n \"shares: !transferable\"\n );\n }\n\n function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}\n}\n" + }, + "contracts/tools/TributeMinion.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\nimport \"../Baal.sol\";\n\ninterface IERC20 {\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n}\n\ncontract TributeMinion {\n event TributeProposal(\n address indexed baal,\n address token,\n uint256 amount,\n address recipient,\n uint256 proposalId\n );\n struct Escrow {\n address token;\n address applicant;\n uint256 amount;\n bool released;\n address safe;\n }\n mapping(address => mapping(uint256 => Escrow)) public escrows;\n\n event EscrowReleased(\n address indexed baal,\n uint32 proposalId,\n address applicant,\n address safe,\n uint256 amount\n );\n\n function encodeTributeProposal(\n address baal,\n uint256 shares,\n uint256 loot,\n address recipient,\n uint32 proposalId,\n address escrow\n ) public pure returns (bytes memory) {\n // Workaround for solidity dynamic memory array\n address[] memory _recipients = new address[](1);\n _recipients[0] = recipient;\n\n bytes memory _releaseEscrow = abi.encodeWithSignature(\n \"releaseEscrow(address,uint32)\",\n baal,\n proposalId\n );\n\n bytes memory tributeMultisend = abi.encodePacked(\n uint8(0),\n escrow,\n uint256(0),\n uint256(_releaseEscrow.length),\n bytes(_releaseEscrow)\n );\n\n if (shares > 0) {\n // Workaround for solidity dynamic memory array\n uint256[] memory _shares = new uint256[](1);\n _shares[0] = shares;\n\n bytes memory _issueShares = abi.encodeWithSignature(\n \"mintShares(address[],uint256[])\",\n _recipients,\n _shares\n );\n\n tributeMultisend = abi.encodePacked(\n tributeMultisend,\n uint8(0),\n baal,\n uint256(0),\n uint256(_issueShares.length),\n bytes(_issueShares)\n );\n }\n if (loot > 0) {\n // Workaround for solidity dynamic memory array\n uint256[] memory _loot = new uint256[](1);\n _loot[0] = loot;\n\n bytes memory _issueLoot = abi.encodeWithSignature(\n \"mintLoot(address[],uint256[])\",\n _recipients,\n _loot\n );\n\n tributeMultisend = abi.encodePacked(\n tributeMultisend,\n uint8(0),\n address(baal),\n uint256(0),\n uint256(_issueLoot.length),\n bytes(_issueLoot)\n );\n }\n\n bytes memory _multisendAction = abi.encodeWithSignature(\n \"multiSend(bytes)\",\n tributeMultisend\n );\n return _multisendAction;\n }\n\n function submitTributeProposal(\n Baal baal,\n address token,\n uint256 amount,\n uint256 shares,\n uint256 loot,\n uint32 expiration,\n uint256 baalgas,\n string memory details\n ) external payable {\n uint32 proposalId = baal.proposalCount() + 1;\n\n bytes memory encodedProposal = encodeTributeProposal(\n address(baal),\n shares,\n loot,\n msg.sender,\n proposalId,\n address(this)\n );\n\n escrows[address(baal)][proposalId] = Escrow(\n token,\n msg.sender,\n amount,\n false,\n baal.target()\n );\n\n baal.submitProposal{value:msg.value}(encodedProposal, expiration, baalgas, details);\n\n emit TributeProposal(\n address(baal),\n token,\n amount,\n msg.sender,\n proposalId\n );\n }\n\n function releaseEscrow(address _baal, uint32 _proposalId) external {\n Baal baal = Baal(_baal);\n Escrow storage escrow = escrows[address(baal)][_proposalId];\n require(!escrow.released, \"Already released\");\n\n bool[4] memory status = baal.getProposalStatus(_proposalId);\n require(status[2], \"Not passed\");\n escrow.released = true;\n\n IERC20 token = IERC20(escrow.token);\n\n emit EscrowReleased(\n _baal,\n _proposalId,\n escrow.applicant,\n escrow.safe,\n escrow.amount\n );\n\n require(\n token.transferFrom(escrow.applicant, escrow.safe, escrow.amount),\n \"Transfer failed\"\n );\n }\n}\n" + }, + "contracts/utils/BaalVotes.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.7;\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol\";\nimport \"./DelegationEIP712Upgradeable.sol\";\n\n/**\n * @dev similar to Openzeplin ERC20Votes\n *\n * uses timestamp instead of block.number and auto self delegates.\n *\n * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either\n * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting\n * power can be queried through the public accessors {getPriorVotes}.\n *\n */\nabstract contract BaalVotes is ERC20PermitUpgradeable, DelegationEIP712Upgradeable {\n using ECDSAUpgradeable for bytes32;\n\n struct Checkpoint {\n /*Baal checkpoint for marking number of delegated votes*/\n uint32 fromTimePoint; /*unix time for referencing voting balance*/\n uint256 votes; /*votes at given unix time*/\n }\n\n // DELEGATE TRACKING\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints; /*maps record of vote `checkpoints` for each account by index*/\n mapping(address => uint256) public numCheckpoints; /*maps number of `checkpoints` for each account*/\n mapping(address => address) public delegates; /*maps record of each account's `shares` delegate*/\n mapping(address => uint256) public delegationNonces; /*nonces for delegating by signature*/\n\n // SIGNATURE HELPERS\n bytes32 constant DELEGATION_TYPEHASH = keccak256(\"Delegation(string name,address delegatee,uint256 nonce,uint256 expiry)\");\n\n event DelegateChanged(\n address indexed delegator,\n address indexed fromDelegate,\n address indexed toDelegate\n ); /*emits when an account changes its voting delegate*/\n event DelegateVotesChanged(\n address indexed delegate,\n uint256 previousBalance,\n uint256 newBalance\n ); /*emits when a delegate account's voting balance changes*/\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n /*If recipient is receiving their first shares, auto-self delegate*/\n if (balanceOf(to) == 0 && numCheckpoints[to] == 0 && amount > 0) {\n delegates[to] = to;\n }\n\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n\n /// @notice Delegate votes from user to `delegatee`.\n /// @param delegatee The address to delegate votes to.\n function delegate(address delegatee) external virtual {\n _delegate(msg.sender, delegatee);\n }\n\n /// @notice Delegates votes from `signer` to `delegatee` with EIP-712 signature.\n /// @param delegatee The address to delegate 'votes' to.\n /// @param nonce The contract state required to match the signature.\n /// @param expiry The time at which to expire the signature.\n /// @param v The v signature\n /// @param r The r signature\n /// @param s The s signature\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(now() <= expiry, \"ERC20Votes: signature expired\");\n address signer = ECDSAUpgradeable.recover(\n _hashTypedDataV4Delegation(\n keccak256(\n abi.encode(\n DELEGATION_TYPEHASH,\n keccak256(abi.encodePacked(name())),\n delegatee,\n nonce,\n expiry\n )\n )\n ),\n v,\n r,\n s\n );\n require(signer != address(0), \"ERC20Votes: invalid signer (0x0)\");\n require(nonce == delegationNonces[signer], \"ERC20Votes: invalid nonce\");\n\n delegationNonces[signer]++;\n _delegate(signer, delegatee);\n }\n\n /// @notice Delegates Baal voting weight.\n /// @param delegator The address to delegate 'votes' from.\n /// @param delegatee The address to delegate 'votes' to.\n function _delegate(address delegator, address delegatee) internal virtual {\n require(balanceOf(delegator) > 0, \"!shares\");\n address currentDelegate = delegates[delegator];\n delegates[delegator] = delegatee;\n\n _moveDelegates(\n currentDelegate,\n delegatee,\n uint256(balanceOf(delegator))\n );\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n }\n\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\n /// @param srcRep The address to delegate 'votes' from.\n /// @param dstRep The address to delegate 'votes' to.\n /// @param amount The amount of votes to delegate\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) private {\n unchecked {\n if (srcRep != dstRep && amount != 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum != 0\n ? getCheckpoint(srcRep, srcRepNum - 1).votes\n : 0;\n uint256 srcRepNew = srcRepOld - amount;\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum != 0\n ? getCheckpoint(dstRep, dstRepNum - 1).votes\n : 0;\n uint256 dstRepNew = dstRepOld + amount;\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n }\n\n /// @notice Elaborates delegate update - cf., 'Compound Governance'.\n /// @param delegatee The address to snapshot\n /// @param nCheckpoints The number of checkpoints delegatee has\n /// @param oldVotes The number of votes the delegatee had\n /// @param newVotes The number of votes the delegate has now\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) private {\n uint32 timePoint = uint32(now());\n\n unchecked {\n if (\n nCheckpoints != 0 &&\n checkpoints[delegatee][nCheckpoints - 1].fromTimePoint == timePoint\n ) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(\n timePoint,\n newVotes\n );\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /// @notice Returns the current timepoint.\n /// @return timePoint returns unix epoch timestamp\n function now() public view returns (uint256 timePoint) {\n return block.timestamp;\n }\n\n /// @notice Returns the prior number of `votes` for `account` as of `timePoint`.\n /// @param account The user to check `votes` for.\n /// @param timePoint The unix time to check `votes` for.\n /// @return votes Past `votes` delegated to `account`.\n function getPastVotes(address account, uint256 timePoint)\n external\n view\n virtual\n returns (uint256 votes)\n {\n require(timePoint < now(), \"!determined\"); /* Prior votes must be in the past*/\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) return 0;\n\n unchecked {\n if (\n getCheckpoint(account, nCheckpoints - 1).fromTimePoint <=\n timePoint\n ) return getCheckpoint(account, nCheckpoints - 1).votes; /* If most recent checkpoint is at or after desired timepoint, return*/\n if (getCheckpoint(account, 0).fromTimePoint > timePoint) return 0;\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n /* Binary search to look for highest timePoint before desired timePoint*/\n uint256 center = upper - (upper - lower) / 2;\n Checkpoint memory cp = getCheckpoint(account, center);\n if (cp.fromTimePoint == timePoint) return cp.votes;\n else if (cp.fromTimePoint < timePoint) lower = center;\n else upper = center - 1;\n }\n votes = getCheckpoint(account, lower).votes;\n }\n }\n\n /// @notice Returns the current delegated `vote` balance for `account`.\n /// @param account The user to check delegated `votes` for.\n /// @return votes Current `votes` delegated to `account`.\n function getVotes(address account)\n external\n view\n virtual\n returns (uint256 votes)\n {\n uint256 nCheckpoints = numCheckpoints[account]; /*Get most recent checkpoint, or 0 if no checkpoints*/\n unchecked {\n votes = nCheckpoints != 0\n ? getCheckpoint(account, nCheckpoints - 1).votes\n : 0;\n }\n }\n\n function getCheckpoint(address delegatee, uint256 nCheckpoints)\n public\n view\n virtual\n returns (Checkpoint memory)\n {\n return checkpoints[delegatee][nCheckpoints];\n }\n}\n" + }, + "contracts/utils/DelegationEIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4Delegation}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4Delegation}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract DelegationEIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME_DELEGATION;\n bytes32 private _HASHED_VERSION_DELEGATION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init_delegation(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained_delegation(name, version);\n }\n\n function __EIP712_init_unchained_delegation(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME_DELEGATION = hashedName;\n _HASHED_VERSION_DELEGATION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4Delegation() internal view returns (bytes32) {\n return _buildDomainSeparatorDelegation(_TYPE_HASH, _EIP712NameHashDelegation(), _EIP712VersionHashDelegation());\n }\n\n function _buildDomainSeparatorDelegation(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4Delegation(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4Delegation(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4Delegation(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_NAME_DELEGATION;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHashDelegation() internal virtual view returns (bytes32) {\n return _HASHED_VERSION_DELEGATION;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "contracts/utils/Poster.sol": { + "content": "/*\n██████╗ ██████╗ ███████╗████████╗███████╗██████╗\n██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗\n██████╔╝██║ ██║███████╗ ██║ █████╗ ██████╔╝\n██╔═══╝ ██║ ██║╚════██║ ██║ ██╔══╝ ██╔══██╗\n██║ ╚██████╔╝███████║ ██║ ███████╗██║ ██║\n╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝\nA ridiculously simple general purpose social media smart contract.\nIt takes two strings (content and tag) as parameters and emits those strings, along with msg.sender, as an event. That's it.\nMade with ❤️ by Auryn.eth\n*/\n// SPDX-License-Identifier: LGPL-3.0-only\n\npragma solidity 0.8.7;\n\ncontract Poster {\n event NewPost(address indexed user, string content, string indexed tag);\n\n function post(string calldata content, string calldata tag) external {\n emit NewPost(msg.sender, content, tag);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/src/addresses/deployed.ts b/src/addresses/deployed.ts index fc53a53..cffd042 100644 --- a/src/addresses/deployed.ts +++ b/src/addresses/deployed.ts @@ -26,7 +26,16 @@ export const deployments = [ }, }, sepolia: { - // TODO: + addresses: { + lootSingleton: "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + sharesSingleton: "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + baalSingleton: "0xc650B598b095613cCddF0f49570FfA475175A5D5", + factory: "0xB2B3909661552942AE1115E9Fc99dF0BC93d71d0", + vaultFactory: "0x763f5c2E59f997A6cC48Bf1228aBf61325244702", + advTokenFactory: "0xD69e5B8F6FA0E5d94B93848700655A78DF24e387", + tributeMinion: "0xdb4D89F2199b9Cf451B7Ff4bdC94b1c96De4bdD0", + DAO:"0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", + }, }, gnosis: { addresses: { @@ -89,7 +98,16 @@ export const deployments = [ }, }, base: { - // TODO: + addresses: { + lootSingleton: "0x52acf023d38A31f7e7bC92cCe5E68d36cC9752d6", + sharesSingleton: "0xc650B598b095613cCddF0f49570FfA475175A5D5", + baalSingleton: "0xE0F33E95aF46EAd1Fe181d2A74919bff903cD5d4", + factory: "0x22e0382194AC1e9929E023bBC2fD2BA6b778E098", + vaultFactory: "0x2eF2fC8a18A914818169eFa183db480d31a90c5D", + advTokenFactory: "0x97Aaa5be8B38795245f1c38A883B44cccdfB3E11", + tributeMinion: "0x00768B047f73D88b6e9c14bcA97221d6E179d468", + DAO:"0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", + }, }, }, }, diff --git a/src/addresses/setup.ts b/src/addresses/setup.ts index eaf1f44..7ab8c52 100644 --- a/src/addresses/setup.ts +++ b/src/addresses/setup.ts @@ -22,13 +22,13 @@ export type ContractSetup = { const DAO_ADDRESS: {[name: string]: string} = { mainnet: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", goerli: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", - sepolia: "", // TODO: + sepolia: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", gnosis: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", polygon: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", polygonMumbai: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", arbitrumOne: "0x4A9a27d614a74Ee5524909cA27bdBcBB7eD3b315", optimisticEthereum: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", - base: "", // TODO: + base: "0x1aCFF11474B9C6D15966Da7A08eD23438CDE23D4", }; export const getSetupAddresses = async ( @@ -56,10 +56,11 @@ export const getSetupAddresses = async ( const gnosisFallbackLibrary = getCompatibilityFallbackHandlerDeployment(filter)?.networkAddresses[chainId]; const gnosisMultisendLibrary = getMultiSendDeployment(filter)?.networkAddresses[chainId]; const gnosisSafeProxyFactory = getProxyFactoryDeployment(filter)?.networkAddresses[chainId]; - // TODO: Zodiac is not deployed on Base network - const moduleProxyFactory = Object.values(SupportedNetworks).includes(Number(chainId)) + let moduleProxyFactory = Object.values(SupportedNetworks).includes(Number(chainId)) ? ContractVersions[Number(chainId) as SupportedNetworks]?.factory?.['1.1.0'] : undefined; + // TODO: Base network is not officially supported by the Zodiac SDK + if (chainId === '8453') moduleProxyFactory = '0x000000000000aDdB49795b0f9bA5BC298cDda236'; const poster = '0x000000000000cd17345801aa8147b8D3950260FF'; if (!gnosisSingleton || !gnosisFallbackLibrary || !gnosisMultisendLibrary || !gnosisSafeProxyFactory) @@ -72,7 +73,7 @@ export const getSetupAddresses = async ( gnosisFallbackLibrary, gnosisMultisendLibrary, gnosisSafeProxyFactory, - moduleProxyFactory: '', + moduleProxyFactory, poster, DAO: DAO_ADDRESS[network.name], }; From 2c56be60442cf911bcebd2e5efe7d31580a5b3b0 Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Sun, 3 Dec 2023 22:41:02 -0500 Subject: [PATCH 4/5] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 20c2e0b..872752c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@daohaus/baal-contracts", - "version": "1.2.13", + "version": "1.2.14", "description": "Lo, also it is the time of His rain.", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", From aa064296e5d156fb71cbc1ba1030d78f70984303 Mon Sep 17 00:00:00 2001 From: Santiago Gonzalez Date: Sun, 3 Dec 2023 23:38:15 -0500 Subject: [PATCH 5/5] fix moduleproxyfactory version --- src/addresses/setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addresses/setup.ts b/src/addresses/setup.ts index 7ab8c52..cf80187 100644 --- a/src/addresses/setup.ts +++ b/src/addresses/setup.ts @@ -57,7 +57,7 @@ export const getSetupAddresses = async ( const gnosisMultisendLibrary = getMultiSendDeployment(filter)?.networkAddresses[chainId]; const gnosisSafeProxyFactory = getProxyFactoryDeployment(filter)?.networkAddresses[chainId]; let moduleProxyFactory = Object.values(SupportedNetworks).includes(Number(chainId)) - ? ContractVersions[Number(chainId) as SupportedNetworks]?.factory?.['1.1.0'] + ? ContractVersions[Number(chainId) as SupportedNetworks]?.factory?.['1.2.0'] : undefined; // TODO: Base network is not officially supported by the Zodiac SDK if (chainId === '8453') moduleProxyFactory = '0x000000000000aDdB49795b0f9bA5BC298cDda236';